Struct futures::future::FutureOption
[−]
[src]
#[must_use = "futures do nothing unless polled"]pub struct FutureOption<T> { /* fields omitted */ }
A future representing a value which may or may not be present.
Created by the IntoFuture
implementation for std::option::Option
.
Trait Implementations
impl<T> From<Option<T>> for FutureOption<T>
[src]
fn from(o: Option<T>) -> FutureOption<T>
[src]
Performs the conversion.
impl<F, T, E> Future for FutureOption<F> where
F: Future<Item = T, Error = E>,
[src]
F: Future<Item = T, Error = E>,
type Item = Option<T>
A successful value
type Error = E
An error
fn poll(&mut self, cx: &mut Context) -> Result<Async<Option<T>>, E>
[src]
Attempt to resolve the future to a final value, registering the current task for wakeup if the value is not yet available. Read more
impl<T> Debug for FutureOption<T> where
T: Debug,
[src]
T: Debug,
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter. Read more
impl<T> Clone for FutureOption<T> where
T: Clone,
[src]
T: Clone,
fn clone(&self) -> FutureOption<T>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl<T> Send for FutureOption<T> where
T: Send,
T: Send,
impl<T> Sync for FutureOption<T> where
T: Sync,
T: Sync,