Skip to main content

ErrorContextExt

Trait ErrorContextExt 

Source
pub trait ErrorContextExt<T> {
    // Required method
    fn with_context<F>(self, f: F) -> SpecialResult<T>
       where F: FnOnce() -> ErrorContext;
}
Expand description

Extension trait for adding context to errors

Required Methods§

Source

fn with_context<F>(self, f: F) -> SpecialResult<T>
where F: FnOnce() -> ErrorContext,

Add context to an error

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.

Implementors§