pub trait Context<T> {
// Required method
fn context<C>(self, context: C) -> Result<T, Error>
where C: Display;
// Provided method
fn with_context<F, C>(self, context_fn: F) -> Result<T, Error>
where C: Display,
F: FnOnce() -> C,
Self: Sized { ... }
}Expand description
Utility to add more context to the Error.
Required Methods§
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.