pub trait IntoMustBoxFuture: Future {
    // Provided method
    fn must_box<'a>(self) -> MustBoxFuture<'a, Self::Output> 
       where Self: 'a + Sized + Send { ... }
}
Expand description

Helper trait for converting raw unboxed futures into MustBoxFutures. Would be nice to impl<F: Future> Into<MustBoxFuture> for F, but blanket impls in rust core prevent this.

Provided Methods§

source

fn must_box<'a>(self) -> MustBoxFuture<'a, Self::Output>
where Self: 'a + Sized + Send,

Convert this raw future into a MustBoxFuture

Implementors§

source§

impl<T> IntoMustBoxFuture for T
where T: Future + ?Sized,