pub trait WithContext<T>: Sized {
// Required methods
fn context(self, loc: &'static str) -> Result<T>;
fn with_context<F>(self, loc: &'static str, f: F) -> Result<T>
where F: FnOnce() -> Option<Box<[(&'static str, String)]>>;
}
Expand description
A trait to add context to a 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.