[][src]Trait actix_web::error::ResponseError

pub trait ResponseError: Debug + Display {
    fn status_code(&self) -> StatusCode { ... }
fn error_response(&self) -> Response<Body> { ... } }

Error that can be converted to Response

Provided methods

fn status_code(&self) -> StatusCode

Response's status code

Internal server error is generated by default.

Important traits for Response<Body>
fn error_response(&self) -> Response<Body>

Create response for error

Internal server error is generated by default.

Loading content...


impl dyn ResponseError + 'static[src]

pub fn downcast_ref<T>(&self) -> Option<&T> where
    T: 'static + ResponseError

Downcasts a response error to a specific type.

Implementations on Foreign Types

impl ResponseError for Error[src]

Return InternalServerError for io::Error

impl ResponseError for Error[src]

Compatibility for failure::Error

impl ResponseError for Error[src]

Return BAD_REQUEST for de::value::Error

impl ResponseError for ProtocolError[src]

impl ResponseError for HandshakeError[src]

impl ResponseError for Error[src]

InternalServerError for JsonError

impl<T> ResponseError for HandshakeError<T> where
    T: Debug

InternalServerError for openssl::ssl::HandshakeError

impl ResponseError for Utf8Error[src]

Return BAD_REQUEST for Utf8Error

impl ResponseError for Error[src]

InternalServerError for openssl::ssl::Error

impl ResponseError for Error[src]

InternalServerError for FormError

impl<E, U> ResponseError for DispatcherError<E, U> where
    E: Debug + Display,
    U: Decoder + Encoder,
    <U as Encoder>::Error: Debug,
    <U as Decoder>::Error: Debug

impl<E> ResponseError for TimeoutError<E> where
    E: ResponseError

Return GATEWAY_TIMEOUT for TimeoutError

impl ResponseError for JsonPayloadError[src]

Return InternalServerError for JsonPayloadError

Loading content...


impl ResponseError for PayloadError[src]

PayloadError returns two possible results:

  • Overflow returns PayloadTooLarge
  • Other errors returns BadRequest

impl ResponseError for SendRequestError[src]

Convert SendRequestError to a server Response

impl ResponseError for ContentTypeError[src]

Return BadRequest for ContentTypeError

impl ResponseError for actix_web::error::CookieParseError[src]

Return BadRequest for cookie::ParseError

impl ResponseError for actix_web::error::JsonPayloadError[src]

Return BadRequest for JsonPayloadError

impl ResponseError for actix_web::error::ParseError[src]

Return BadRequest for ParseError

impl ResponseError for PathError[src]

Return BadRequest for PathError

impl ResponseError for QueryPayloadError[src]

Return BadRequest for QueryPayloadError

impl ResponseError for ReadlinesError[src]

Return BadRequest for ReadlinesError

impl ResponseError for UrlGenerationError[src]

InternalServerError for UrlGeneratorError

impl ResponseError for UrlencodedError[src]

Return BadRequest for UrlencodedError

impl ResponseError for InvalidHeaderValue[src]

BadRequest for InvalidHeaderValue

impl ResponseError for actix_web::http::Error[src]

Return InternalServerError for HttpError, Response generation can return HttpError, so it is internal error

impl ResponseError for Canceled[src]

InternalServerError for Canceled

impl<E> ResponseError for BlockingError<E> where
    E: Debug

InternalServerError for BlockingError

impl<T> ResponseError for InternalError<T> where
    T: Debug + Display + 'static, 

Loading content...