pub trait ResultErrorWhile<C> {
type ContextError;
// Required methods
fn error_while(self, context: C) -> Self::ContextError;
fn error_while_with<F>(self, context: F) -> Self::ContextError
where F: FnOnce() -> C;
}
Expand description
Add context to error carried by another type like Result
Required Associated Types§
type ContextError
Required Methods§
fn error_while(self, context: C) -> Self::ContextError
fn error_while_with<F>(self, context: F) -> Self::ContextErrorwhere
F: FnOnce() -> C,
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.