Struct snafu::futures::try_future::WithContext
source · pub struct WithContext<Fut, F, E> { /* private fields */ }
Expand description
Future for the with_context
combinator.
See the TryFutureExt::with_context
method for more details.
Trait Implementations§
source§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,
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,
impl<'pin, Fut, F, E> Unpin for WithContext<Fut, F, E>where
__WithContext<'pin, Fut, F, E>: Unpin,
Auto Trait Implementations§
impl<Fut, F, E> RefUnwindSafe for WithContext<Fut, F, E>where
E: RefUnwindSafe,
F: RefUnwindSafe,
Fut: RefUnwindSafe,
impl<Fut, F, E> Send for WithContext<Fut, F, E>where
E: Send,
F: Send,
Fut: Send,
impl<Fut, F, E> Sync for WithContext<Fut, F, E>where
E: Sync,
F: Sync,
Fut: Sync,
impl<Fut, F, E> UnwindSafe for WithContext<Fut, F, E>where
E: UnwindSafe,
F: UnwindSafe,
Fut: UnwindSafe,
Blanket Implementations§
source§impl<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere
F: Future,
§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
source§impl<Fut> TryFutureExt for Futwhere
Fut: TryFuture,
impl<Fut> TryFutureExt for Futwhere
Fut: TryFuture,
source§fn context<C, E>(self, context: C) -> Context<Fut, C, E> ⓘwhere
C: IntoError<E, Source = <Fut as TryFuture>::Error>,
E: Error + ErrorCompat,
fn context<C, E>(self, context: C) -> Context<Fut, C, E> ⓘwhere
C: IntoError<E, Source = <Fut as TryFuture>::Error>,
E: Error + ErrorCompat,
Extend a [
TryFuture
]’s error with additional context-sensitive
information. Read moresource§fn with_context<F, C, E>(self, context: F) -> WithContext<Fut, F, 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> ⓘwhere
F: FnOnce(&mut <Fut as TryFuture>::Error) -> C,
C: IntoError<E, Source = <Fut as TryFuture>::Error>,
E: Error + ErrorCompat,
Extend a [
TryFuture
]’s error with lazily-generated context-sensitive
information. Read moresource§fn whatever_context<S, E>(self, context: S) -> WhateverContext<Fut, S, E> ⓘwhere
S: Into<String>,
E: FromString,
fn whatever_context<S, E>(self, context: S) -> WhateverContext<Fut, S, E> ⓘwhere
S: Into<String>,
E: FromString,
Extend a [
TryFuture
]’s error with information from a string. Read moresource§fn with_whatever_context<F, S, E>(
self,
context: F
) -> WithWhateverContext<Fut, F, 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> ⓘwhere
F: FnOnce(&mut <Fut as TryFuture>::Error) -> S,
S: Into<String>,
E: FromString,
Extend a [
TryFuture
]’s error with information from a
lazily-generated string. Read more