pub trait ResultErrorWhileWrap<O, E, C> {
// Required methods
fn wrap_error_while(self, context: C) -> Result<O, ErrorContext<E, C>>;
fn wrap_error_while_with<F>(
self,
context: F,
) -> Result<O, ErrorContext<E, C>>
where F: FnOnce() -> C;
}
Expand description
Result
extension trait to wrap error value in ErrorContext
with given context information
Required Methods§
fn wrap_error_while(self, context: C) -> Result<O, ErrorContext<E, C>>
fn wrap_error_while_with<F>(self, context: F) -> Result<O, ErrorContext<E, C>>where
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.