Trait http_error::HttpError

source ·
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§

Provided Methods§

source

fn reason(&self, f: &mut Formatter<'_>) -> Result

source

fn headers(&self) -> Option<Vec<(HeaderName, HeaderValue)>>

Trait Implementations§

source§

impl From<AnyHttpError> for Box<dyn HttpError + Send + 'static>

source§

fn from(err: AnyHttpError) -> Self

Converts to this type from the input type.
source§

impl<E> From<E> for Box<dyn HttpError>
where E: HttpError + 'static,

source§

fn from(err: E) -> Self

Converts to this type from the input type.

Implementations on Foreign Types§

source§

impl<E> HttpError for Box<E>
where E: HttpError,

Implementors§

source§

impl HttpError for http_error::option_ext::StatusError

source§

impl<E> HttpError for http_error::result_ext::StatusError<E>
where E: Error + 'static,