pub trait ResultExt<T> {
// Required method
fn unrecoverable_error(
self,
context: &str,
) -> Result<T, InternalServerError>;
}Expand description
Extension trait for Result that allows us to handle unrecoverable errors
Required Methods§
Sourcefn unrecoverable_error(self, context: &str) -> Result<T, InternalServerError>
fn unrecoverable_error(self, context: &str) -> Result<T, InternalServerError>
Equivalent to map_err, but always maps to InternalServerError,
logging the error and context
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".