pub trait ErrorInfo {
// Required methods
fn status(&self) -> StatusCode;
fn code(&self) -> &'static str;
fn raw_message(&self) -> &'static str;
fn fields(&self) -> HashMap<String, String>;
// Provided method
fn message(&self) -> String { ... }
}Expand description
Trait containing common information for an error
Required Methods§
Sourcefn status(&self) -> StatusCode
fn status(&self) -> StatusCode
Retrieves the status of the error message
Sourcefn raw_message(&self) -> &'static str
fn raw_message(&self) -> &'static str
Retrieves the raw message of the error, without variable replacements