Type Alias bevy::tasks::futures_lite::future::Boxed

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