Enum futures_util::future::MaybeDone [−][src]
MaybeDone
, a future that may have completed.
This is created by the maybe_done
function.
Variants
Future(Fut)
A not-yet-completed future
Done(Fut::Output)
The output of the completed future
Gone
The empty variant after the result of a maybe_done
has been
taken using the take_output
method.
Methods
impl<Fut: Future> MaybeDone<Fut>
[src]
impl<Fut: Future> MaybeDone<Fut>
pub fn take_output(self: PinMut<Self>) -> Option<Fut::Output>
[src]
pub fn take_output(self: PinMut<Self>) -> Option<Fut::Output>
Attempt to take the output of a MaybeDone
without driving it
towards completion.
Trait Implementations
impl<Fut: Debug + Future> Debug for MaybeDone<Fut> where
Fut::Output: Debug,
[src]
impl<Fut: Debug + Future> Debug for MaybeDone<Fut> where
Fut::Output: Debug,
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<Fut: Future + Unpin> Unpin for MaybeDone<Fut>
[src]
impl<Fut: Future + Unpin> Unpin for MaybeDone<Fut>
impl<Fut: Future> Future for MaybeDone<Fut>
[src]
impl<Fut: Future> Future for MaybeDone<Fut>
type Output = ()
🔬 This is a nightly-only experimental API. (futures_api
)
futures in libcore are unstable
The result of the Future
.
fn poll(self: PinMut<Self>, cx: &mut Context) -> Poll<Self::Output>
[src]
fn poll(self: PinMut<Self>, cx: &mut Context) -> Poll<Self::Output>
🔬 This is a nightly-only experimental API. (futures_api
)
futures in libcore are unstable
Attempt to resolve the future to a final value, registering the current task for wakeup if the value is not yet available. Read more