pub trait ResultExt<T> {
// Required method
fn with_context(self, context: &str) -> CommonResult<T>;
}Available on crate feature
error only.Expand description
Extension trait for Result types.
Required Methods§
Sourcefn with_context(self, context: &str) -> CommonResult<T>
fn with_context(self, context: &str) -> CommonResult<T>
Convert any error to a CommonError with context.
§Errors
Returns an error if the underlying result is an error.