Skip to main content

BoxFuture

Type Alias BoxFuture 

Source
pub type BoxFuture<'a, T> = Pin<Box<dyn Future<Output = T> + Send + 'a>>;
Available on non-target_family=wasm only.
Expand description

Boxed dyn-future return shape used by SyncWaiter::wait_async so the trait stays object-safe through Arc<dyn SyncWaiter>. Native async fn on the trait would be RPITIT and dyn-incompatible by default; callers dispatch through Arc<dyn SyncWaiter>, so boxing the future is mandatory.

Aliased Typeยง

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