futures::future

Function ok

Source
pub fn ok<T, E>(t: T) -> FutureResult<T, E>
Expand description

Creates a new future that will immediately resolve successfully to the given value.

ยงExamples

use futures_core::future::*;

let future_of_1 = ok::<u32, u32>(1);