Struct actix_http::error::InternalError
source · [−]pub struct InternalError<T> { /* private fields */ }Expand description
Helper type that can wrap any error and generate custom response.
In following example any io::Error will be converted into “BAD REQUEST”
response as opposite to INTERNAL SERVER ERROR which is defined by
default.
fn index(req: Request) -> Result<&'static str> {
Err(error::ErrorBadRequest(io::Error::new(io::ErrorKind::Other, "error")))
}Implementations
Create InternalError instance
Create InternalError with predefined Response.
Trait Implementations
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
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
pub fn vzip(self) -> V
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
