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