Function ntex::util::lazy[][src]

pub fn lazy<F, R>(f: F) -> Lazy<F>

Notable traits for Lazy<F>

impl<F, R> Future for Lazy<F> where
    F: FnOnce(&mut Context<'_>) -> R, 
type Output = R;
where
    F: FnOnce(&mut Context<'_>) -> R, 
Expand description

Creates a new future that allows delayed execution of a closure.

The provided closure is only run once the future is polled.