pub trait WithContext: Sized {
type Ok;
type Err;
// Required method
fn context_with<E, C>(self, f: impl FnOnce() -> C) -> Result<Self::Ok, E>
where C: IntoError<E>,
Self::Err: Into<C::Source>;
// Provided method
fn context<E, C>(self, context: C) -> Result<Self::Ok, E>
where C: IntoError<E>,
Self::Err: Into<C::Source> { ... }
}Required Associated Types§
Required Methods§
fn context_with<E, C>(self, f: impl FnOnce() -> C) -> Result<Self::Ok, E>
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.