Struct snafu::futures::try_future::Context [−][src]
pub struct Context<Fut, C, E> { /* fields omitted */ }
Expand description
Future for the context
combinator.
See the TryFutureExt::context
method for more details.
Trait Implementations
Auto Trait Implementations
impl<Fut, C, E> RefUnwindSafe for Context<Fut, C, E> where
C: RefUnwindSafe,
E: RefUnwindSafe,
Fut: RefUnwindSafe,
impl<Fut, C, E> UnwindSafe for Context<Fut, C, E> where
C: UnwindSafe,
E: UnwindSafe,
Fut: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (
into_future
)The output that the future will produce on completion.
type Future = F
type Future = F
🔬 This is a nightly-only experimental API. (
into_future
)Which kind of future are we turning this into?
🔬 This is a nightly-only experimental API. (
into_future
)Creates a future from a value.
pub fn context<C, E>(Self, C) -> Context<Fut, C, E>ⓘ where
C: IntoError<E, Source = <Fut as TryFuture>::Error>,
E: Error + ErrorCompat,
pub fn context<C, E>(Self, 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 more
pub fn with_context<F, C, E>(Self, 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() -> C,
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,
F: FnOnce() -> C,
pub fn with_context<F, C, E>(Self, 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() -> C,
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,
F: FnOnce() -> C,
Notable traits for WithContext<Fut, F, E>
impl<Fut, F, C, E> Future for WithContext<Fut, F, E> where
Fut: TryFuture,
F: FnOnce() -> 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
pub fn whatever_context<S, E>(Self, 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
E: FromString,
S: Into<String>,
pub fn whatever_context<S, E>(Self, 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
E: FromString,
S: Into<String>,
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>;
Extend a [TryFuture
]’s error with information from a string. Read more
pub fn with_whatever_context<F, S, E>(Self, 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(&Fut::Error) -> S,
S: Into<String>,
E: FromString,
Fut::Error: Into<E::Source>, type Output = Result<Fut::Ok, E>;
where
E: FromString,
F: FnOnce(&<Fut as TryFuture>::Error) -> S,
S: Into<String>,
pub fn with_whatever_context<F, S, E>(Self, 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(&Fut::Error) -> S,
S: Into<String>,
E: FromString,
Fut::Error: Into<E::Source>, type Output = Result<Fut::Ok, E>;
where
E: FromString,
F: FnOnce(&<Fut as TryFuture>::Error) -> S,
S: Into<String>,
Notable traits for WithWhateverContext<Fut, F, E>
impl<Fut, F, S, E> Future for WithWhateverContext<Fut, F, E> where
Fut: TryFuture,
F: FnOnce(&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