pub trait Context<T, E, X: Display>: Sealed {
// Required methods
fn context<C>(self, context: C) -> Result<T, TError<X>>
where C: Display + Send + Sync + 'static;
fn with_context<C, F>(self, f: F) -> Result<T, TError<X>>
where C: Display + Send + Sync + 'static,
F: FnOnce() -> C;
}Expand description
Extension trait for Result to add context to the Result.
Required 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.