pub trait HttpError: Error {
// Required method
fn status_code(&self) -> StatusCode;
// Provided methods
fn reason(&self, f: &mut Formatter<'_>) -> Result { ... }
fn headers(&self) -> Option<Vec<(HeaderName, HeaderValue)>> { ... }
}Required Methods§
fn status_code(&self) -> StatusCode
Provided Methods§
fn reason(&self, f: &mut Formatter<'_>) -> Result
fn headers(&self) -> Option<Vec<(HeaderName, HeaderValue)>>
Trait Implementations§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".