Struct actix_web::error::InternalError [−][src]
pub struct InternalError<T> { /* fields omitted */ }Expand description
Wraps errors to alter the generated response status code.
In following example, the io::Error is wrapped into ErrorBadRequest which will generate a
response with the 400 Bad Request status code instead of the usual status code generated by
an io::Error.
Examples
async fn handler_error() -> Result<String, actix_web::Error> {
let err = io::Error::new(io::ErrorKind::Other, "error");
Err(error::ErrorBadRequest(err))
}Implementations
Constructs an InternalError with given status code.
Constructs an InternalError with pre-defined response.
Trait Implementations
Convert self to HttpResponse.
Wraps responder to allow alteration of its response. Read more
Auto Trait Implementations
impl<T> !RefUnwindSafe for InternalError<T>
impl<T> !Send for InternalError<T>
impl<T> !Sync for InternalError<T>
impl<T> Unpin for InternalError<T> where
T: Unpin,
impl<T> !UnwindSafe for InternalError<T>
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more
