Struct snafu::futures::try_future::WithWhateverContext
source · [−]pub struct WithWhateverContext<Fut, F, E> { /* private fields */ }
Expand description
Future for the
with_whatever_context
combinator.
See the TryFutureExt::with_whatever_context
method for more
details.
Trait Implementations
sourceimpl<Fut, F, S, E> Future for WithWhateverContext<Fut, F, E> where
Fut: TryFuture,
F: FnOnce(&mut Fut::Error) -> S,
S: Into<String>,
E: FromString,
Fut::Error: Into<E::Source>,
impl<Fut, F, S, E> Future for WithWhateverContext<Fut, F, E> where
Fut: TryFuture,
F: FnOnce(&mut Fut::Error) -> S,
S: Into<String>,
E: FromString,
Fut::Error: Into<E::Source>,
impl<'pin, Fut, F, E> Unpin for WithWhateverContext<Fut, F, E> where
__WithWhateverContext<'pin, Fut, F, E>: Unpin,
Auto Trait Implementations
impl<Fut, F, E> RefUnwindSafe for WithWhateverContext<Fut, F, E> where
E: RefUnwindSafe,
F: RefUnwindSafe,
Fut: RefUnwindSafe,
impl<Fut, F, E> Send for WithWhateverContext<Fut, F, E> where
E: Send,
F: Send,
Fut: Send,
impl<Fut, F, E> Sync for WithWhateverContext<Fut, F, E> where
E: Sync,
F: Sync,
Fut: Sync,
impl<Fut, F, E> UnwindSafe for WithWhateverContext<Fut, F, E> where
E: UnwindSafe,
F: UnwindSafe,
Fut: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<F> IntoFuture for F where
F: Future,
impl<F> IntoFuture for F where
F: Future,
type Output = <F as Future>::Output
type Output = <F as Future>::Output
🔬 This is a nightly-only experimental API. (
into_future
)The output that the future will produce on completion.
type IntoFuture = F
type IntoFuture = F
🔬 This is a nightly-only experimental API. (
into_future
)Which kind of future are we turning this into?
sourcefn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
🔬 This is a nightly-only experimental API. (
into_future
)Creates a future from a value.
sourceimpl<Fut> TryFutureExt for Fut where
Fut: TryFuture,
impl<Fut> TryFutureExt for Fut where
Fut: TryFuture,
sourcefn context<C, E>(self, context: C) -> Context<Fut, C, E>ⓘNotable traits for Context<Fut, C, E>impl<Fut, C, E> Future for Context<Fut, C, E> where
Fut: TryFuture,
C: IntoError<E, Source = Fut::Error>,
E: Error + ErrorCompat, type Output = Result<Fut::Ok, E>;
where
C: IntoError<E, Source = <Fut as TryFuture>::Error>,
E: Error + ErrorCompat,
fn context<C, E>(self, context: C) -> Context<Fut, C, E>ⓘNotable traits for Context<Fut, C, E>impl<Fut, C, E> Future for Context<Fut, C, E> where
Fut: TryFuture,
C: IntoError<E, Source = Fut::Error>,
E: Error + ErrorCompat, type Output = Result<Fut::Ok, E>;
where
C: IntoError<E, Source = <Fut as TryFuture>::Error>,
E: Error + ErrorCompat,
Fut: TryFuture,
C: IntoError<E, Source = Fut::Error>,
E: Error + ErrorCompat, type Output = Result<Fut::Ok, E>;
Extend a [TryFuture
]’s error with additional context-sensitive
information. Read more
sourcefn with_context<F, C, E>(self, context: F) -> WithContext<Fut, F, E>ⓘNotable traits for WithContext<Fut, F, E>impl<Fut, F, C, E> Future for WithContext<Fut, F, E> where
Fut: TryFuture,
F: FnOnce(&mut Fut::Error) -> C,
C: IntoError<E, Source = Fut::Error>,
E: Error + ErrorCompat, type Output = Result<Fut::Ok, E>;
where
F: FnOnce(&mut <Fut as TryFuture>::Error) -> C,
C: IntoError<E, Source = <Fut as TryFuture>::Error>,
E: Error + ErrorCompat,
fn with_context<F, C, E>(self, context: F) -> WithContext<Fut, F, E>ⓘNotable traits for WithContext<Fut, F, E>impl<Fut, F, C, E> Future for WithContext<Fut, F, E> where
Fut: TryFuture,
F: FnOnce(&mut Fut::Error) -> C,
C: IntoError<E, Source = Fut::Error>,
E: Error + ErrorCompat, type Output = Result<Fut::Ok, E>;
where
F: FnOnce(&mut <Fut as TryFuture>::Error) -> C,
C: IntoError<E, Source = <Fut as TryFuture>::Error>,
E: Error + ErrorCompat,
Fut: TryFuture,
F: FnOnce(&mut Fut::Error) -> C,
C: IntoError<E, Source = Fut::Error>,
E: Error + ErrorCompat, type Output = Result<Fut::Ok, E>;
Extend a [TryFuture
]’s error with lazily-generated context-sensitive
information. Read more
sourcefn whatever_context<S, E>(self, context: S) -> WhateverContext<Fut, S, E>ⓘNotable traits for WhateverContext<Fut, S, E>impl<Fut, S, E> Future for WhateverContext<Fut, S, E> where
Fut: TryFuture,
S: Into<String>,
E: FromString,
Fut::Error: Into<E::Source>, type Output = Result<Fut::Ok, E>;
where
S: Into<String>,
E: FromString,
fn whatever_context<S, E>(self, context: S) -> WhateverContext<Fut, S, E>ⓘNotable traits for WhateverContext<Fut, S, E>impl<Fut, S, E> Future for WhateverContext<Fut, S, E> where
Fut: TryFuture,
S: Into<String>,
E: FromString,
Fut::Error: Into<E::Source>, type Output = Result<Fut::Ok, E>;
where
S: Into<String>,
E: FromString,
Fut: TryFuture,
S: Into<String>,
E: FromString,
Fut::Error: Into<E::Source>, type Output = Result<Fut::Ok, E>;
Extend a [TryFuture
]’s error with information from a string. Read more
sourcefn with_whatever_context<F, S, E>(
self,
context: F
) -> WithWhateverContext<Fut, F, E>ⓘNotable traits for WithWhateverContext<Fut, F, E>impl<Fut, F, S, E> Future for WithWhateverContext<Fut, F, E> where
Fut: TryFuture,
F: FnOnce(&mut Fut::Error) -> S,
S: Into<String>,
E: FromString,
Fut::Error: Into<E::Source>, type Output = Result<Fut::Ok, E>;
where
F: FnOnce(&mut <Fut as TryFuture>::Error) -> S,
S: Into<String>,
E: FromString,
fn with_whatever_context<F, S, E>(
self,
context: F
) -> WithWhateverContext<Fut, F, E>ⓘNotable traits for WithWhateverContext<Fut, F, E>impl<Fut, F, S, E> Future for WithWhateverContext<Fut, F, E> where
Fut: TryFuture,
F: FnOnce(&mut Fut::Error) -> S,
S: Into<String>,
E: FromString,
Fut::Error: Into<E::Source>, type Output = Result<Fut::Ok, E>;
where
F: FnOnce(&mut <Fut as TryFuture>::Error) -> S,
S: Into<String>,
E: FromString,
Fut: TryFuture,
F: FnOnce(&mut Fut::Error) -> S,
S: Into<String>,
E: FromString,
Fut::Error: Into<E::Source>, type Output = Result<Fut::Ok, E>;
Extend a [TryFuture
]’s error with information from a
lazily-generated string. Read more