Skip to main content

BoxFuture

Type Alias BoxFuture 

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

A boxed future used as the return type of command handlers.

Command handlers return this type so that every command shares one concrete (type-erased) future type, which is what makes it possible to store arbitrary commands in a single table.

Aliased Typeยง

#[repr(transparent)]
pub struct BoxFuture<'a, T> { /* private fields */ }