pub trait DetailedError: StdError + Serialize {
// Required method
fn error_code(&self) -> Cow<'static, str>;
// Provided method
fn log_level(&self) -> Level { ... }
}Expand description
Error trait which internal errors must implement such that it can be transformed to a complete JSON error response.
An error that is also an HTTP response, an actix ResponseError, converts to an
ErrorResponse that is logged by its status code.
Required Methods§
Sourcefn error_code(&self) -> Cow<'static, str>
fn error_code(&self) -> Cow<'static, str>
Identifying name of the error.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".