Type Alias bevy::tasks::futures_lite::future::BoxedLocal

pub type BoxedLocal<T> = Pin<Box<dyn Future<Output = T>>>;
Available on crate feature alloc only.
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> {}