[−][src]Enum futures::future::MaybeDone
A future that may have completed.
This is created by the maybe_done()
function.
Variants
A not-yet-completed future
The output of the completed future
The empty variant after the result of a MaybeDone
has been
taken using the take_output
method.
Methods
impl<Fut> MaybeDone<Fut> where
Fut: Future,
[src]
Fut: Future,
pub fn output_mut(
self: Pin<&mut MaybeDone<Fut>>
) -> Option<&mut <Fut as Future>::Output>
[src]
self: Pin<&mut MaybeDone<Fut>>
) -> Option<&mut <Fut as Future>::Output>
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 been completed and take_output
has not yet been called.
pub fn take_output(
self: Pin<&mut MaybeDone<Fut>>
) -> Option<<Fut as Future>::Output>
[src]
self: Pin<&mut MaybeDone<Fut>>
) -> Option<<Fut as Future>::Output>
Attempt to take the output of a MaybeDone
without driving it
towards completion.
Trait Implementations
impl<Fut> Future for MaybeDone<Fut> where
Fut: Future,
[src]
Fut: Future,
type Output = ()
The type of value produced on completion.
fn poll(
self: Pin<&mut MaybeDone<Fut>>,
cx: &mut Context
) -> Poll<<MaybeDone<Fut> as Future>::Output>
[src]
self: Pin<&mut MaybeDone<Fut>>,
cx: &mut Context
) -> Poll<<MaybeDone<Fut> as Future>::Output>
impl<Fut> Unpin for MaybeDone<Fut> where
Fut: Unpin + Future,
[src]
Fut: Unpin + Future,
impl<Fut> Debug for MaybeDone<Fut> where
Fut: Debug + Future,
<Fut as Future>::Output: Debug,
[src]
Fut: Debug + Future,
<Fut as Future>::Output: Debug,
impl<Fut> FusedFuture for MaybeDone<Fut> where
Fut: Future,
[src]
Fut: Future,
fn is_terminated(&self) -> bool
[src]
Auto Trait Implementations
impl<Fut> Send for MaybeDone<Fut> where
Fut: Send,
<Fut as Future>::Output: Send,
Fut: Send,
<Fut as Future>::Output: Send,
impl<Fut> Sync for MaybeDone<Fut> where
Fut: Sync,
<Fut as Future>::Output: Sync,
Fut: Sync,
<Fut as Future>::Output: Sync,
impl<Fut> UnwindSafe for MaybeDone<Fut> where
Fut: UnwindSafe,
<Fut as Future>::Output: UnwindSafe,
Fut: UnwindSafe,
<Fut as Future>::Output: UnwindSafe,
impl<Fut> RefUnwindSafe for MaybeDone<Fut> where
Fut: RefUnwindSafe,
<Fut as Future>::Output: RefUnwindSafe,
Fut: RefUnwindSafe,
<Fut as Future>::Output: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
ⓘImportant traits for &'_ mut Ffn borrow_mut(&mut self) -> &mut T
[src]
ⓘImportant traits for &'_ mut F
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> FutureExt for T where
T: Future + ?Sized,
[src]
T: Future + ?Sized,
ⓘImportant traits for Map<Fut, F>fn map<U, F>(self, f: F) -> Map<Self, F> where
F: FnOnce(Self::Output) -> U,
[src]
ⓘImportant traits for Map<Fut, F>
F: FnOnce(Self::Output) -> U,
ⓘImportant traits for Then<Fut1, Fut2, F>fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F> where
F: FnOnce(Self::Output) -> Fut,
Fut: Future,
[src]
ⓘImportant traits for Then<Fut1, Fut2, F>
F: FnOnce(Self::Output) -> Fut,
Fut: Future,
ⓘImportant traits for Either<A, B>fn left_future<B>(self) -> Either<Self, B> where
B: Future<Output = Self::Output>,
[src]
ⓘImportant traits for Either<A, B>
B: Future<Output = Self::Output>,
ⓘImportant traits for Either<A, B>fn right_future<A>(self) -> Either<A, Self> where
A: Future<Output = Self::Output>,
[src]
ⓘImportant traits for Either<A, B>
A: Future<Output = Self::Output>,
fn into_stream(self) -> IntoStream<Self>
[src]
ⓘImportant traits for Flatten<Fut>fn flatten(self) -> Flatten<Self> where
Self::Output: Future,
[src]
ⓘImportant traits for Flatten<Fut>
Self::Output: Future,
fn flatten_stream(self) -> FlattenStream<Self> where
Self::Output: Stream,
[src]
Self::Output: Stream,
ⓘImportant traits for Fuse<Fut>fn fuse(self) -> Fuse<Self>
[src]
ⓘImportant traits for Fuse<Fut>
ⓘImportant traits for Inspect<Fut, F>fn inspect<F>(self, f: F) -> Inspect<Self, F> where
F: FnOnce(&Self::Output),
[src]
ⓘImportant traits for Inspect<Fut, F>
F: FnOnce(&Self::Output),
ⓘImportant traits for CatchUnwind<Fut>fn catch_unwind(self) -> CatchUnwind<Self> where
Self: UnwindSafe,
[src]
ⓘImportant traits for CatchUnwind<Fut>
Self: UnwindSafe,
ⓘImportant traits for Shared<Fut>fn shared(self) -> Shared<Self> where
Self::Output: Clone,
[src]
ⓘImportant traits for Shared<Fut>
Self::Output: Clone,
fn remote_handle(self) -> (Remote<Self>, RemoteHandle<Self::Output>)
[src]
ⓘImportant traits for Pin<P>fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a + Send>> where
Self: Send + 'a,
[src]
ⓘImportant traits for Pin<P>
Self: Send + 'a,
ⓘImportant traits for Pin<P>fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>> where
Self: 'a,
[src]
ⓘImportant traits for Pin<P>
Self: 'a,
ⓘImportant traits for UnitError<Fut>fn unit_error(self) -> UnitError<Self>
[src]
ⓘImportant traits for UnitError<Fut>
ⓘImportant traits for NeverError<Fut>fn never_error(self) -> NeverError<Self>
[src]
ⓘImportant traits for NeverError<Fut>
fn poll_unpin(&mut self, cx: &mut Context) -> Poll<Self::Output> where
Self: Unpin,
[src]
Self: Unpin,