Trait actix_http::error::ResponseError [−][src]
Error that can be converted to Response
Provided methods
fn status_code(&self) -> StatusCode[src]
Response's status code
Internal server error is generated by default.
fn error_response(&self) -> Responseⓘ[src]
Create response for error
Internal server error is generated by default.
Implementations
impl dyn ResponseError + 'static[src]
pub fn downcast_ref<T: ResponseError + 'static>(&self) -> Option<&T>[src]
Downcasts generic body to a specific type.
pub fn downcast_mut<T: ResponseError + 'static>(&mut self) -> Option<&mut T>[src]
Downcasts a generic body to a mutable specific type.
Implementations on Foreign Types
impl<E: ResponseError> ResponseError for TimeoutError<E>[src]
Inspects the underlying enum and returns an appropriate status code.
If the variant is TimeoutError::Service, the error code of the service is returned.
Otherwise, StatusCode::GATEWAY_TIMEOUT is returned.
fn status_code(&self) -> StatusCode[src]
impl ResponseError for JsonError[src]
Returns StatusCode::INTERNAL_SERVER_ERROR for JsonError.
impl ResponseError for FormError[src]
Returns StatusCode::INTERNAL_SERVER_ERROR for FormError.
impl ResponseError for SslError[src]
impl ResponseError for DeError[src]
Returns StatusCode::BAD_REQUEST for DeError.
fn status_code(&self) -> StatusCode[src]
impl ResponseError for Utf8Error[src]
Returns StatusCode::BAD_REQUEST for Utf8Error.
fn status_code(&self) -> StatusCode[src]
impl ResponseError for Error[src]
Inspects the underlying io::ErrorKind and returns an appropriate status code.
If the error is io::ErrorKind::NotFound, StatusCode::NOT_FOUND is returned. If the
error is io::ErrorKind::PermissionDenied, StatusCode::FORBIDDEN is returned. Otherwise,
StatusCode::INTERNAL_SERVER_ERROR is returned.
fn status_code(&self) -> StatusCode[src]
impl<E, U: Encoder<I> + Decoder, I> ResponseError for FramedDispatcherError<E, U, I> where
E: Debug + Display,
<U as Encoder<I>>::Error: Debug,
<U as Decoder>::Error: Debug, [src]
Loading content...E: Debug + Display,
<U as Encoder<I>>::Error: Debug,
<U as Decoder>::Error: Debug,
Implementors
impl ResponseError for SendRequestError[src]
Convert SendRequestError to a server Response
fn status_code(&self) -> StatusCode[src]
impl ResponseError for ContentTypeError[src]
Return BadRequest for ContentTypeError
fn status_code(&self) -> StatusCode[src]
impl ResponseError for actix_http::error::CookieParseError[src]
Return BadRequest for cookie::ParseError
fn status_code(&self) -> StatusCode[src]
impl ResponseError for actix_http::error::ParseError[src]
Return BadRequest for ParseError
fn status_code(&self) -> StatusCode[src]
impl ResponseError for PayloadError[src]
PayloadError returns two possible results:
OverflowreturnsPayloadTooLarge- Other errors returns
BadRequest
fn status_code(&self) -> StatusCode[src]
impl ResponseError for HandshakeError[src]
fn error_response(&self) -> Responseⓘ[src]
impl ResponseError for ProtocolError[src]
impl ResponseError for BlockingError[src]
InternalServerError for BlockingError
impl ResponseError for Canceled[src]
Returns StatusCode::INTERNAL_SERVER_ERROR for Canceled.
impl ResponseError for InvalidHeaderValue[src]
Returns StatusCode::BAD_REQUEST for header::InvalidHeaderValue.
fn status_code(&self) -> StatusCode[src]
impl ResponseError for HttpError[src]
Returns StatusCode::INTERNAL_SERVER_ERROR for HttpError.
impl<T> ResponseError for InternalError<T> where
T: Debug + Display + 'static, [src]
T: Debug + Display + 'static,