Struct futures::future::Lazy [] [src]

#[must_use = "futures do nothing unless polled"]
pub struct Lazy<R, F> where
    R: IntoFuture
{ /* fields omitted */ }

A future which defers creation of the actual future until the future is polled.

This is created by the lazy function.

Trait Implementations

impl<R, F> Debug for Lazy<R, F> where
    F: Debug,
    R: Debug + IntoFuture,
    <R as IntoFuture>::Future: Debug


Formats the value using the given formatter. Read more

impl<R, F> Future for Lazy<R, F> where
    F: FnOnce(&mut Context) -> R,
    R: IntoFuture

A successful value

An error


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<R, F> Send for Lazy<R, F> where
    F: Send,
    <R as IntoFuture>::Future: Send

impl<R, F> Sync for Lazy<R, F> where
    F: Sync,
    <R as IntoFuture>::Future: Sync