logo
pub trait ResponseError {
    fn status(&self) -> StatusCode;

    fn as_response(&self) -> Response
    where
        Self: StdError + Send + Sync + 'static
, { ... } }
Expand description

Represents a type that can be converted to Error.

Required methods

The status code of this error.

Provided methods

Convert this error to a HTTP response.

Implementors