[−][src]Function futures::future::ok
ⓘImportant traits for Ready<T>
pub fn ok<T, E>(t: T) -> Ready<Result<T, E>>
Create a future that is immediately ready with a success value.
Examples
#![feature(async_await, await_macro)] use futures::future; let a = future::ok::<i32, i32>(1); assert_eq!(await!(a), Ok(1));