Type Alias futures_lite::future::Boxed

source ·
pub type Boxed<T> = Pin<Box<dyn Future<Output = T> + Send + 'static>>;
Expand description

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

§Examples

use futures_lite::future::{self, FutureExt};

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

Aliased Type§

struct Boxed<T> { /* private fields */ }