[][src]Type Definition futures_lite::future::Boxed

type Boxed<T> = Pin<Box<dyn Future<Output = T> + Send>>;

Type alias for Pin<Box<dyn Future<Output = T> + Send>>.

Examples

use futures_lite::*;

// These two lines are equivalent:
let f1: future::Boxed<i32> = async { 1 + 2 }.boxed();
let f2: future::Boxed<i32> = Box::pin(async { 1 + 2 });