pub struct ScopedFutureWithValue<T, F>{ /* private fields */ }Expand description
A Future that sets a value T of a future local for the future F during its execution.
This future also returns a future local value after execution.
Implementations§
Source§impl<T, F> ScopedFutureWithValue<T, F>
impl<T, F> ScopedFutureWithValue<T, F>
Sourcepub fn discard_value(self) -> ScopedFuture<T, F> ⓘ
pub fn discard_value(self) -> ScopedFuture<T, F> ⓘ
Discards the future local value from the future output.
Trait Implementations§
Source§impl<T, F> Debug for ScopedFutureWithValue<T, F>
impl<T, F> Debug for ScopedFutureWithValue<T, F>
Source§impl<T, F> Drop for ScopedFutureWithValue<T, F>
impl<T, F> Drop for ScopedFutureWithValue<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 ScopedFutureWithValue<T, F>
impl<T, F> Future for ScopedFutureWithValue<T, F>
impl<'pin, T, F> Unpin for ScopedFutureWithValue<T, F>
Auto Trait Implementations§
impl<T, F> Freeze for ScopedFutureWithValue<T, F>
impl<T, F> !RefUnwindSafe for ScopedFutureWithValue<T, F>
impl<T, F> Send for ScopedFutureWithValue<T, F>where
F: Send,
impl<T, F> Sync for ScopedFutureWithValue<T, F>
impl<T, F> !UnwindSafe for ScopedFutureWithValue<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