Function actix_utils::future::ok [−][src]
pub fn ok<T, E>(val: T) -> Ready<Result<T, E>>ⓘ
Creates a future that is immediately ready with a success value.
Examples
use actix_utils::future::ok; let a = ok::<_, ()>(1); assert_eq!(a.await, Ok(1));