pub trait WithContext<T> {
// Required methods
fn with_context<F>(self, f: F) -> Result<T>
where F: FnOnce() -> ErrorContext;
fn with_simple_context(self, operation: &str) -> Result<T>;
}Expand description
Trait for adding context to errors
Required Methods§
fn with_context<F>(self, f: F) -> Result<T>where
F: FnOnce() -> ErrorContext,
fn with_simple_context(self, operation: &str) -> Result<T>
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.