scoped_futures

Trait ScopedFutureExt

source
pub trait ScopedFutureExt: Sized {
    // Required methods
    fn scoped<'upper_bound, 'subject>(
        self,
    ) -> ScopedFutureWrapper<'upper_bound, 'subject, Self> ;
    fn scope_boxed<'upper_bound, 'subject>(
        self,
    ) -> ScopedBoxFuture<'upper_bound, 'subject, <Self as Future>::Output>
       where Self: Send + Future + 'subject;
    fn scope_boxed_local<'upper_bound, 'subject>(
        self,
    ) -> ScopedLocalBoxFuture<'upper_bound, 'subject, <Self as Future>::Output>
       where Self: Future + 'subject;
}
Expand description

An extension trait for Future that provides methods for encoding lifetime upper bound information.

Required Methods§

source

fn scoped<'upper_bound, 'subject>( self, ) -> ScopedFutureWrapper<'upper_bound, 'subject, Self>

Encodes the lifetimes of this Future’s captures.

source

fn scope_boxed<'upper_bound, 'subject>( self, ) -> ScopedBoxFuture<'upper_bound, 'subject, <Self as Future>::Output>
where Self: Send + Future + 'subject,

Boxes this Future and encodes the lifetimes of its captures.

source

fn scope_boxed_local<'upper_bound, 'subject>( self, ) -> ScopedLocalBoxFuture<'upper_bound, 'subject, <Self as Future>::Output>
where Self: Future + 'subject,

Boxes this Future and encodes the lifetimes of its captures.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

source§

impl<Fut: Future> ScopedFutureExt for Fut