Enum MaybeDone
enum MaybeDone<Fut: Future>
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 >::Output) The output of the completed future
-
Gone The empty variant after the result of a
MaybeDonehas been taken using thetake_outputmethod.
Implementations
impl<Fut: Future> MaybeDone<Fut>
fn output_mut(self: Pin<&mut Self>) -> Option<&mut <Fut as >::Output>Returns an
Optioncontaining a mutable reference to the output of the future. The output of this method will beSomeif and only if the inner future has been completed andtake_outputhas not yet been called.fn take_output(self: Pin<&mut Self>) -> Option<<Fut as >::Output>Attempt to take the output of a
MaybeDonewithout driving it towards completion.
impl<F> IntoFuture for MaybeDone<Fut>
fn into_future(self: Self) -> <F as IntoFuture>::IntoFuture
impl<Fut> Freeze for MaybeDone<Fut>
impl<Fut> RefUnwindSafe for MaybeDone<Fut>
impl<Fut> Send for MaybeDone<Fut>
impl<Fut> Sync for MaybeDone<Fut>
impl<Fut> UnsafeUnpin for MaybeDone<Fut>
impl<Fut> UnwindSafe for MaybeDone<Fut>
impl<Fut: $crate::fmt::Debug + Future> Debug for MaybeDone<Fut>
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl<Fut: Future + Unpin> Unpin for MaybeDone<Fut>
impl<Fut: Future> FusedFuture for MaybeDone<Fut>
fn is_terminated(self: &Self) -> bool
impl<Fut: Future> Future for MaybeDone<Fut>
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<<Self as >::Output>
impl<T> Any for MaybeDone<Fut>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for MaybeDone<Fut>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for MaybeDone<Fut>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> From for MaybeDone<Fut>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> FutureExt for MaybeDone<Fut>
impl<T, U> Into for MaybeDone<Fut>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for MaybeDone<Fut>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for MaybeDone<Fut>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>