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 poll
ed.
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,
[src]
F: Debug,
R: Debug + IntoFuture,
<R as IntoFuture>::Future: Debug,
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
[src]
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,
[src]
F: FnOnce(&mut Context) -> R,
R: IntoFuture,
type Item = <R as IntoFuture>::Item
A successful value
type Error = <R as IntoFuture>::Error
An error
fn poll(
&mut self,
cx: &mut Context
) -> Result<Async<<R as IntoFuture>::Item>, <R as IntoFuture>::Error>
[src]
&mut self,
cx: &mut Context
) -> Result<Async<<R as IntoFuture>::Item>, <R as IntoFuture>::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