pub enum Error {
Responder(Response),
Boxed(BoxError),
Report(BoxError, Response),
}Expand description
Represents errors that can occur handling application.
Variants§
Responder(Response)
Receives a Response as an error.
Boxed(BoxError)
Receives a boxed std::error::Error as an error.
Report(BoxError, Response)
Receives a boxed std::error::Error and Response pair as an error.
Implementations§
source§impl Error
impl Error
sourcepub fn is<T>(&self) -> boolwhere
T: StdError + 'static,
pub fn is<T>(&self) -> boolwhere
T: StdError + 'static,
Forwards to the method defined on the type dyn Error.
sourcepub fn downcast_ref<T>(&self) -> Option<&T>where
T: StdError + 'static,
pub fn downcast_ref<T>(&self) -> Option<&T>where
T: StdError + 'static,
Downcast this error object by reference.
sourcepub fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: StdError + 'static,
pub fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: StdError + 'static,
Downcast this error object by mutable reference.
Trait Implementations§
source§impl Error for Error
impl Error for Error
source§fn 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 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<CookiesError> for Error
Available on crate feature cookie only.
impl From<CookiesError> for Error
Available on crate feature
cookie only.source§fn from(e: CookiesError) -> Self
fn from(e: CookiesError) -> Self
Converts to this type from the input type.
source§impl From<Error> for Error
Available on crate feature session only.
impl From<Error> for Error
Available on crate feature
session only.source§fn from(e: SessionError) -> Self
fn from(e: SessionError) -> Self
Converts to this type from the input type.
source§impl From<Error> for Error
Available on crate feature multipart only.
impl From<Error> for Error
Available on crate feature
multipart only.source§fn from(e: MultipartError) -> Self
fn from(e: MultipartError) -> Self
Converts to this type from the input type.
source§impl From<HeaderError> for Error
impl From<HeaderError> for Error
source§fn from(e: HeaderError) -> Self
fn from(e: HeaderError) -> Self
Converts to this type from the input type.
source§impl From<Infallible> for Error
impl From<Infallible> for Error
source§fn from(e: Infallible) -> Self
fn from(e: Infallible) -> Self
Converts to this type from the input type.
source§impl From<ParamsError> for Error
Available on crate feature params only.
impl From<ParamsError> for Error
Available on crate feature
params only.source§fn from(e: ParamsError) -> Self
fn from(e: ParamsError) -> Self
Converts to this type from the input type.
source§impl From<PayloadError> for Error
impl From<PayloadError> for Error
source§fn from(e: PayloadError) -> Self
fn from(e: PayloadError) -> Self
Converts to this type from the input type.
source§impl From<StateError> for Error
Available on crate feature state only.
impl From<StateError> for Error
Available on crate feature
state only.source§fn from(e: StateError) -> Self
fn from(e: StateError) -> Self
Converts to this type from the input type.
source§impl From<WebSocketError> for Error
Available on crate feature websocket only.
impl From<WebSocketError> for Error
Available on crate feature
websocket only.source§fn from(e: WebSocketError) -> Self
fn from(e: WebSocketError) -> Self
Converts to this type from the input type.
source§impl IntoResponse for Error
impl IntoResponse for Error
source§fn into_response(self) -> Response
fn into_response(self) -> Response
Convert self to HTTP
Response.source§fn into_error(self) -> Error
fn into_error(self) -> Error
Convert self to the
Error.Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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