Function futures::finished
[−]
[src]
pub fn finished<T, E>(t: T) -> Finished<T, E> where T: Send + 'static, E: Send + 'static
Creates a "leaf future" from an immediate value of a finished and successful computation.
The returned future is similar to done
where it will immediately run a
scheduled callback with the provided value.
Examples
use futures::*; let future_of_1 = finished::<u32, u32>(1);