pub(crate) trait ResultErrorContext {
// Required method
fn err_context<C: Display, F: FnOnce() -> C>(self, context: F) -> Self;
}
Expand description
Give results context in case of error.
Lifts the ErrorContext
trait to Result
types.
Required Methods§
Sourcefn err_context<C: Display, F: FnOnce() -> C>(self, context: F) -> Self
fn err_context<C: Display, F: FnOnce() -> C>(self, context: F) -> Self
Give context if self
is an error.
If self
is an error, prepend the given context
.
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.