Struct futures::future::Lazy [−][src]
#[must_use = "futures do nothing unless polled"]pub struct Lazy<F> { /* fields omitted */ }
A future which, when polled, invokes a closure and yields its result.
This is created by the lazy function.
Trait Implementations
impl<F> Unpin for Lazy<F>[src]
impl<F> Unpin for Lazy<F>impl<F> Debug for Lazy<F> where
F: Debug, [src]
impl<F> Debug for Lazy<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<R, F> Future for Lazy<F> where
F: FnOnce(&mut Context) -> R, [src]
impl<R, F> Future for Lazy<F> where
F: FnOnce(&mut Context) -> R, type Output = R
🔬 This is a nightly-only experimental API. (futures_api)
futures in libcore are unstable
The result of the Future.
fn poll(self: PinMut<Lazy<F>>, cx: &mut Context) -> Poll<R>[src]
fn poll(self: PinMut<Lazy<F>>, cx: &mut Context) -> Poll<R>🔬 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