Enum TryMaybeDone

enum TryMaybeDone<Fut: TryFuture>

A future that may have completed with an error.

This is created by the [try_maybe_done()] function.

Variants

Future(Fut)

A not-yet-completed future

Done(<Fut as >::Ok)

The output of the completed future

Gone

The empty variant after the result of a TryMaybeDone has been taken using the take_output method, or if the future returned an error.

Implementations

impl<Fut: TryFuture> TryMaybeDone<Fut>

fn output_mut(self: Pin<&mut Self>) -> Option<&mut <Fut as >::Ok>

Returns an Option containing a mutable reference to the output of the future. The output of this method will be Some if and only if the inner future has completed successfully and take_output has not yet been called.

fn take_output(self: Pin<&mut Self>) -> Option<<Fut as >::Ok>

Attempt to take the output of a TryMaybeDone without driving it towards completion.

impl<F> IntoFuture for TryMaybeDone<Fut>

fn into_future(self: Self) -> <F as IntoFuture>::IntoFuture

impl<F, T, E> TryFuture for TryMaybeDone<Fut>

fn try_poll(self: Pin<&mut F>, cx: &mut Context<'_>) -> Poll<<F as Future>::Output>

impl<Fut> Freeze for TryMaybeDone<Fut>

impl<Fut> RefUnwindSafe for TryMaybeDone<Fut>

impl<Fut> Send for TryMaybeDone<Fut>

impl<Fut> Sync for TryMaybeDone<Fut>

impl<Fut> TryFutureExt for TryMaybeDone<Fut>

impl<Fut> UnsafeUnpin for TryMaybeDone<Fut>

impl<Fut> UnwindSafe for TryMaybeDone<Fut>

impl<Fut: $crate::fmt::Debug + TryFuture> Debug for TryMaybeDone<Fut>

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl<Fut: TryFuture + Unpin> Unpin for TryMaybeDone<Fut>

impl<Fut: TryFuture> FusedFuture for TryMaybeDone<Fut>

fn is_terminated(self: &Self) -> bool

impl<Fut: TryFuture> Future for TryMaybeDone<Fut>

fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<<Self as >::Output>

impl<T> Any for TryMaybeDone<Fut>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for TryMaybeDone<Fut>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for TryMaybeDone<Fut>

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> From for TryMaybeDone<Fut>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> FutureExt for TryMaybeDone<Fut>

impl<T, U> Into for TryMaybeDone<Fut>

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for TryMaybeDone<Fut>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for TryMaybeDone<Fut>

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>