pub struct ScopedFuture<T, F>(/* private fields */)
where
T: Send + 'static,
F: Future;Expand description
A Future that sets a value T of a future local for the future F during its execution.
Unlike the ScopedFutureWithValue this future discards the future local value.
Trait Implementations§
Source§impl<T, F> Debug for ScopedFuture<T, F>
impl<T, F> Debug for ScopedFuture<T, F>
Source§impl<T, F> From<ScopedFutureWithValue<T, F>> for ScopedFuture<T, F>
impl<T, F> From<ScopedFutureWithValue<T, F>> for ScopedFuture<T, F>
Source§fn from(value: ScopedFutureWithValue<T, F>) -> Self
fn from(value: ScopedFutureWithValue<T, F>) -> Self
Converts to this type from the input type.
Source§impl<T, F> Future for ScopedFuture<T, F>
impl<T, F> Future for ScopedFuture<T, F>
impl<'pin, T, F> Unpin for ScopedFuture<T, F>
Auto Trait Implementations§
impl<T, F> Freeze for ScopedFuture<T, F>
impl<T, F> !RefUnwindSafe for ScopedFuture<T, F>
impl<T, F> Send for ScopedFuture<T, F>where
F: Send,
impl<T, F> Sync for ScopedFuture<T, F>
impl<T, F> !UnwindSafe for ScopedFuture<T, F>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<F> FutureLocalStorage for Fwhere
F: Future,
impl<F> FutureLocalStorage for Fwhere
F: Future,
Source§fn with_scope<T, S>(
self,
scope: &'static S,
value: T,
) -> ScopedFutureWithValue<T, F> ⓘ
fn with_scope<T, S>( self, scope: &'static S, value: T, ) -> ScopedFutureWithValue<T, F> ⓘ
Sets a given value as the future local value of this future. Read more
Source§impl<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere
F: Future,
Source§type IntoFuture = F
type IntoFuture = F
Which kind of future are we turning this into?
Source§fn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
Creates a future from a value. Read more