Trait actix_http::error::ResponseError [−][src]
pub trait ResponseError: Debug + Display { fn status_code(&self) -> StatusCode { ... } fn error_response(&self) -> Responseⓘ { ... } }
Expand description
Error that can be converted to Response
Provided methods
fn status_code(&self) -> StatusCode
fn status_code(&self) -> StatusCode
Response’s status code
Internal server error is generated by default.
Implementations
Downcasts generic body to a specific type.
Downcasts a generic body to a mutable specific type.
Implementations on Foreign Types
Return GATEWAY_TIMEOUT
for TimeoutError
InternalServerError
for JsonError
InternalServerError
for FormError
InternalServerError
for openssl::ssl::Error
InternalServerError
for openssl::ssl::HandshakeError
Return BAD_REQUEST
for de::value::Error
Return BAD_REQUEST
for Utf8Error
Return InternalServerError
for io::Error
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,
InternalServerError
for actix::MailboxError
This is supported on feature=actors
only
InternalServerError
for actix::ResolverError
This is supported on feature=actors
only