pub fn lazy<F, R>(f: F) -> Lazy<F>
    where F: FnOnce(&mut Context<'_>) -> R,
{
    Lazy { f: Some(f) }
}
/// Creates a new future that allows delayed execution of a closure.
///
/// The provided closure is only run once the future is polled.
///
/// # Examples
///
/// ```
/// #![feature(async_await)]
/// # futures::executor::block_on(async {
/// use futures::future;
///
/// let a = future::lazy(|_| 1);
/// assert_eq!(a.await, 1);
///
/// let b = future::lazy(|_| -> i32 {
///     panic!("oh no!")
/// });
/// drop(b); // closure is never run
/// # });
/// ```
Creates a new future that allows delayed execution of a closure.
The provided closure is only run once the future is polled.
Creates a new future that allows delayed execution of a closure . The provided closure is only run once the future is polled .
pub fn lazy<F, R>(f: F) -> Lazy<F>
    where F: FnOnce(&mut Context<'_>) -> R,
{
    Lazy { f: Some(f) }
}
pub fn lazy < F , R > ( f : F ) -> Lazy < F > where F : FnOnce ( & mut Context < ' _ > ) -> R , { Lazy { f : Some ( f ) } }
Creates a new future that allows delayed execution of a closure.
Creates a new future that allows delayed execution of a closure .
f
F
examples
None
![feature(async_await)]
None
futures::executor::block_on(async {
None
});
None