pub trait Context<T, E> {
// Required methods
fn context<C>(self, context: C) -> Result<T>
where C: Display + Send + Sync + 'static;
fn with_context<C, F>(self, f: F) -> Result<T>
where C: Display + Send + Sync + 'static,
F: FnOnce() -> C;
}
Expand description
This trait allows extending the Result type so that it can create a
termwiz::Error
that wraps an underlying other error and provide
additional context on that error.