Trait pingora_error::OrErr
source · pub trait OrErr<T, E> {
// Required methods
fn or_err(self, et: ErrorType, context: &'static str) -> Result<T, BError>
where E: Into<Box<dyn ErrorTrait + Send + Sync>>;
fn or_err_with<C: Into<ImmutStr>, F: FnOnce() -> C>(
self,
et: ErrorType,
context: F
) -> Result<T, BError>
where E: Into<Box<dyn ErrorTrait + Send + Sync>>;
fn explain_err<C: Into<ImmutStr>, F: FnOnce(E) -> C>(
self,
et: ErrorType,
context: F
) -> Result<T, BError>;
}Expand description
Helper trait to chain errors with context
Required Methods§
Object Safety§
This trait is not object safe.