Skip to main content

BoxFuture

Type Alias BoxFuture 

Source
pub type BoxFuture<'a, T> = Pin<Box<dyn Future<Output = T> + Send + 'a>>;
Expand description

A boxed future that is Send and can be stored in collections.

This type alias is used throughout the handler traits for object-safe async methods. Identical to futures::future::BoxFuture but defined locally to avoid exposing the futures crate in the public API surface.

Aliased Typeยง

pub struct BoxFuture<'a, T> { /* private fields */ }