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,
impl<Fut> Future for MaybeDone<Fut> where
Fut: Future,
[src]
[+]
impl<Fut> Future for MaybeDone<Fut> where
Fut: Future,