pub trait ErrorExt: StackError {
// Required method
fn as_any(&self) -> &dyn Any;
// Provided methods
fn status_code(&self) -> StatusCode { ... }
fn output_msg(&self) -> String
where Self: Sized { ... }
fn root_cause(&self) -> Option<&dyn Error>
where Self: Sized { ... }
}
Expand description
Extension to Error
in std.
Required Methods§
Provided Methods§
sourcefn status_code(&self) -> StatusCode
fn status_code(&self) -> StatusCode
Map this error to StatusCode.
fn output_msg(&self) -> Stringwhere
Self: Sized,
sourcefn root_cause(&self) -> Option<&dyn Error>where
Self: Sized,
fn root_cause(&self) -> Option<&dyn Error>where
Self: Sized,
Find out root level error for nested error