pub trait AddContext<T, Err, CtxErr> {
// Required method
fn add_context<D, F>(self, f: F) -> Result<T, CtxErr>
where D: Display,
F: FnOnce() -> D;
}Expand description
The trait to add error context info to a Result<T, E>
Required Methods§
fn add_context<D, F>(self, f: F) -> Result<T, CtxErr>
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.
Implementations on Foreign Types§
Source§impl<T> AddContext<T, AnyError, AnyError> for Result<T, AnyError>
When adding context info, convert an AnyError to another AnyError.
impl<T> AddContext<T, AnyError, AnyError> for Result<T, AnyError>
When adding context info, convert an AnyError to another AnyError.