Trait error_info::ErrorInfo
source · 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