Trait scoped_futures::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.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<Fut: Future> ScopedFutureExt for Fut