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§
Source§impl From<AnyHttpError> for Box<dyn HttpError + Send + 'static>
impl From<AnyHttpError> for Box<dyn HttpError + Send + 'static>
Source§fn from(err: AnyHttpError) -> Self
fn from(err: AnyHttpError) -> Self
Converts to this type from the input type.