pub trait Context<T, E>: Sealed {
// Required methods
fn context<C>(self, context: C) -> Result<T, Error>
where C: Display + Send + Sync + 'static;
fn with_context<C, F>(self, f: F) -> Result<T, Error>
where C: Display + Send + Sync + 'static,
F: FnOnce() -> C;
}
Expand description
Attach more context to an error.
Inspired by anyhow::Context
.
Required Methods§
Object Safety§
This trait is not object safe.