Enum futures::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 as Future>::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> MaybeDone<Fut> where
Fut: Future,
[src]
impl<Fut> MaybeDone<Fut> where
Fut: Future,
pub fn take_output(
self: PinMut<MaybeDone<Fut>>
) -> Option<<Fut as Future>::Output>
[src]
pub fn take_output(
self: PinMut<MaybeDone<Fut>>
) -> Option<<Fut as Future>::Output>
Attempt to take the output of a MaybeDone
without driving it
towards completion.
Trait Implementations
impl<Fut> Unpin for MaybeDone<Fut> where
Fut: Unpin + Future,
[src]
impl<Fut> Unpin for MaybeDone<Fut> where
Fut: Unpin + Future,
impl<Fut> Debug for MaybeDone<Fut> where
Fut: Debug + Future,
<Fut as Future>::Output: Debug,
[src]
impl<Fut> Debug for MaybeDone<Fut> where
Fut: Debug + Future,
<Fut as Future>::Output: Debug,
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl<Fut> Future for MaybeDone<Fut> where
Fut: Future,
[src]
impl<Fut> Future for MaybeDone<Fut> where
Fut: Future,
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<MaybeDone<Fut>>,
cx: &mut Context
) -> Poll<<MaybeDone<Fut> as Future>::Output>
[src]
fn poll(
self: PinMut<MaybeDone<Fut>>,
cx: &mut Context
) -> Poll<<MaybeDone<Fut> as Future>::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