Enum actix_web::error::DispatchError
source · [−]#[non_exhaustive]
pub enum DispatchError {
Service(Response<BoxBody>),
Body(Box<dyn Error + 'static, Global>),
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 + 'static, Global>)
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 ssl streams.
HandlerDroppedPayload
Handler dropped payload before reading EOF.
InternalError
Internal error.
Trait Implementations
sourceimpl Debug for DispatchError
impl Debug for DispatchError
sourceimpl Display for DispatchError
impl Display for DispatchError
sourceimpl Error for DispatchError
impl Error for DispatchError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
sourceimpl From<Error> for DispatchError
impl From<Error> for DispatchError
sourcefn from(original: Error) -> DispatchError
fn from(original: Error) -> DispatchError
Converts to this type from the input type.
sourceimpl From<Error> for DispatchError
impl From<Error> for DispatchError
sourcefn from(original: Error) -> DispatchError
fn from(original: Error) -> DispatchError
Converts to this type from the input type.
sourceimpl From<ParseError> for DispatchError
impl From<ParseError> for DispatchError
sourcefn from(original: ParseError) -> DispatchError
fn from(original: ParseError) -> DispatchError
Converts to this type from the input type.
sourceimpl From<Response<BoxBody>> for DispatchError
impl From<Response<BoxBody>> for DispatchError
sourcefn from(original: Response<BoxBody>) -> DispatchError
fn from(original: Response<BoxBody>) -> DispatchError
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for DispatchError
impl !Send for DispatchError
impl !Sync for DispatchError
impl Unpin for DispatchError
impl !UnwindSafe for DispatchError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more