Function futures_lite::future::ready

source ·
pub fn ready<T>(val: T) -> Ready<T> 
Expand description

Creates a future that resolves to the provided value.

§Examples

use futures_lite::future;

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