Struct futures::future::OptionFuture [−][src]
#[must_use = "futures do nothing unless polled"]pub struct OptionFuture<F> { /* fields omitted */ }
A future representing a value which may or may not be present.
Created by the From
implementation for std::option::Option
.
use futures::prelude::*; use futures::future::OptionFuture; let fut: OptionFuture<_> = Some(123).into();
Trait Implementations
impl<T> From<Option<T>> for OptionFuture<T>
[src]
impl<T> From<Option<T>> for OptionFuture<T>
fn from(option: Option<T>) -> OptionFuture<T>
[src]
fn from(option: Option<T>) -> OptionFuture<T>
Performs the conversion.
impl<F> Clone for OptionFuture<F> where
F: Clone,
[src]
impl<F> Clone for OptionFuture<F> where
F: Clone,
fn clone(&self) -> OptionFuture<F>
[src]
fn clone(&self) -> OptionFuture<F>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl<F> Debug for OptionFuture<F> where
F: Debug,
[src]
impl<F> Debug for OptionFuture<F> where
F: 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<F> Future for OptionFuture<F> where
F: Future,
[src]
impl<F> Future for OptionFuture<F> where
F: Future,
type Output = Option<<F as Future>::Output>
🔬 This is a nightly-only experimental API. (futures_api
)
futures in libcore are unstable
The result of the Future
.
fn poll(
self: PinMut<OptionFuture<F>>,
cx: &mut Context
) -> Poll<<OptionFuture<F> as Future>::Output>
[src]
fn poll(
self: PinMut<OptionFuture<F>>,
cx: &mut Context
) -> Poll<<OptionFuture<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<F> Send for OptionFuture<F> where
F: Send,
impl<F> Send for OptionFuture<F> where
F: Send,
impl<F> Sync for OptionFuture<F> where
F: Sync,
impl<F> Sync for OptionFuture<F> where
F: Sync,