Struct futures::future::UnwrapOrElse [−][src]
#[must_use = "futures do nothing unless polled"]pub struct UnwrapOrElse<Fut, F> { /* fields omitted */ }
Future for the unwrap_or_else
combinator. It unwraps the result, returning
the content of the Ok
as Output
or if the value is an Err
then it
calls op
with its value.
Trait Implementations
impl<Fut, F> Unpin for UnwrapOrElse<Fut, F> where
Fut: Unpin,
[src]
impl<Fut, F> Unpin for UnwrapOrElse<Fut, F> where
Fut: Unpin,
impl<Fut, F> Debug for UnwrapOrElse<Fut, F> where
F: Debug,
Fut: Debug,
[src]
impl<Fut, F> Debug for UnwrapOrElse<Fut, F> where
F: Debug,
Fut: 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, F> Future for UnwrapOrElse<Fut, F> where
F: FnOnce(<Fut as TryFuture>::Error) -> <Fut as TryFuture>::Ok,
Fut: TryFuture,
[src]
impl<Fut, F> Future for UnwrapOrElse<Fut, F> where
F: FnOnce(<Fut as TryFuture>::Error) -> <Fut as TryFuture>::Ok,
Fut: TryFuture,
type Output = <Fut as TryFuture>::Ok
🔬 This is a nightly-only experimental API. (futures_api
)
futures in libcore are unstable
The result of the Future
.
fn poll(
self: PinMut<UnwrapOrElse<Fut, F>>,
cx: &mut Context
) -> Poll<<UnwrapOrElse<Fut, F> as Future>::Output>
[src]
fn poll(
self: PinMut<UnwrapOrElse<Fut, F>>,
cx: &mut Context
) -> Poll<<UnwrapOrElse<Fut, F> 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
Auto Trait Implementations
impl<Fut, F> Send for UnwrapOrElse<Fut, F> where
F: Send,
Fut: Send,
impl<Fut, F> Send for UnwrapOrElse<Fut, F> where
F: Send,
Fut: Send,
impl<Fut, F> Sync for UnwrapOrElse<Fut, F> where
F: Sync,
Fut: Sync,
impl<Fut, F> Sync for UnwrapOrElse<Fut, F> where
F: Sync,
Fut: Sync,