Struct futures_util::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<F: Debug> Debug for OptionFuture<F>
[src]

Formats the value using the given formatter. Read more

impl<F: Clone> Clone for OptionFuture<F>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<F: Future> Future for OptionFuture<F>
[src]

🔬 This is a nightly-only experimental API. (futures_api)

futures in libcore are unstable

The result of the Future.

🔬 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

impl<T> From<Option<T>> for OptionFuture<T>
[src]

Performs the conversion.

Auto Trait Implementations

impl<F> Send for OptionFuture<F> where
    F: Send

impl<F> Sync for OptionFuture<F> where
    F: Sync