Enum actix_web::error::DispatchError
source · #[non_exhaustive]pub enum DispatchError {
Service(Response<BoxBody>),
Body(Box<dyn Error>),
Upgrade,
Io(Error),
Parse(ParseError),
H2(Error),
SlowRequestTimeout,
DisconnectTimeout,
HandlerDroppedPayload,
InternalError,
}
Expand description
A set of errors that can occur during dispatching HTTP requests.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Service(Response<BoxBody>)
Service error.
Body(Box<dyn Error>)
Body streaming error.
Upgrade
Upgrade service error.
Io(Error)
An io::Error
that occurred while trying to read or write to a network stream.
Parse(ParseError)
Request parse error.
H2(Error)
HTTP/2 error.
SlowRequestTimeout
The first request did not complete within the specified timeout.
DisconnectTimeout
Disconnect timeout. Makes sense for TLS streams.
HandlerDroppedPayload
Handler dropped payload before reading EOF.
InternalError
Internal error.
Trait Implementations§
source§impl Debug for DispatchError
impl Debug for DispatchError
source§impl Display for DispatchError
impl Display for DispatchError
source§impl Error for DispatchError
impl Error for DispatchError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<Error> for DispatchError
impl From<Error> for DispatchError
source§fn from(original: Error) -> DispatchError
fn from(original: Error) -> DispatchError
Converts to this type from the input type.
source§impl From<Error> for DispatchError
impl From<Error> for DispatchError
source§fn from(original: Error) -> DispatchError
fn from(original: Error) -> DispatchError
Converts to this type from the input type.
source§impl From<ParseError> for DispatchError
impl From<ParseError> for DispatchError
source§fn from(original: ParseError) -> DispatchError
fn from(original: ParseError) -> DispatchError
Converts to this type from the input type.
Auto Trait Implementations§
impl !Freeze for DispatchError
impl !RefUnwindSafe for DispatchError
impl !Send for DispatchError
impl !Sync for DispatchError
impl Unpin for DispatchError
impl !UnwindSafe for DispatchError
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more