ErrorContext

Trait ErrorContext 

Source
pub trait ErrorContext<T> {
    // Required method
    fn context(self, ctx: impl Into<String>) -> Result<T>;
}
Expand description

Extension trait for adding context to Result<T, Error>.

Similar to anyhow::Context but for BaseID’s error type.

Required Methods§

Source

fn context(self, ctx: impl Into<String>) -> Result<T>

Attach context to the error, if present.

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§

Source§

impl<T> ErrorContext<T> for Result<T>