futures_lite::future

Type Alias BoxedLocal

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

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

§Examples

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

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

Aliased Type§

struct BoxedLocal<T> {}