[][src]Function async_std::future::ready

pub async fn ready<T>(val: T) -> T

Resolves to the provided value.

This function is an async version of std::convert::identity.

Examples

use async_std::future;

assert_eq!(future::ready(10).await, 10);