[][src]Function heim_common::prelude::futures::future::ok

pub fn ok<T, E>(t: T) -> Ready<Result<T, E>>

Notable traits for Ready<T>

impl<T> Future for Ready<T> type Output = T;

Create a future that is immediately ready with a success value.

Examples

use futures::future;

let a = future::ok::<i32, i32>(1);
assert_eq!(a.await, Ok(1));