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§
sourcefn scoped<'upper_bound, 'subject>(
self
) -> ScopedFutureWrapper<'upper_bound, 'subject, Self> ⓘ
fn scoped<'upper_bound, 'subject>( self ) -> ScopedFutureWrapper<'upper_bound, 'subject, Self> ⓘ
Encodes the lifetimes of this Future
’s captures.
sourcefn scope_boxed<'upper_bound, 'subject>(
self
) -> ScopedBoxFuture<'upper_bound, 'subject, <Self as Future>::Output>where
Self: Send + Future + 'subject,
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.
sourcefn scope_boxed_local<'upper_bound, 'subject>(
self
) -> ScopedLocalBoxFuture<'upper_bound, 'subject, <Self as Future>::Output>where
Self: Future + 'subject,
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.