pub enum Error {
Responder(Response<Body>),
Boxed(Box<dyn Error + Sync + Send>),
Report(Box<dyn Error + Sync + Send>, Response<Body>),
}
Expand description
Represents errors that can occur handling application.
Variants§
Responder(Response<Body>)
Receives a Response
as an error.
Boxed(Box<dyn Error + Sync + Send>)
Receives a boxed std::error::Error
as an error.
Report(Box<dyn Error + Sync + Send>, Response<Body>)
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: Error + 'static,
pub fn is<T>(&self) -> boolwhere
T: Error + 'static,
Forwards to the method defined on the type dyn Error
.
sourcepub fn downcast_ref<T>(&self) -> Option<&T>where
T: Error + 'static,
pub fn downcast_ref<T>(&self) -> Option<&T>where
T: Error + 'static,
Downcast this error object by reference.
sourcepub fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: Error + 'static,
pub fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: Error + '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
impl From<CookiesError> for Error
source§fn from(e: CookiesError) -> Error
fn from(e: CookiesError) -> Error
Converts to this type from the input type.
source§impl From<HeaderError> for Error
impl From<HeaderError> for Error
source§fn from(e: HeaderError) -> Error
fn from(e: HeaderError) -> Error
Converts to this type from the input type.
source§impl From<Infallible> for Error
impl From<Infallible> for Error
source§fn from(e: Infallible) -> Error
fn from(e: Infallible) -> Error
Converts to this type from the input type.
source§impl From<ParamsError> for Error
impl From<ParamsError> for Error
source§fn from(e: ParamsError) -> Error
fn from(e: ParamsError) -> Error
Converts to this type from the input type.
source§impl From<PayloadError> for Error
impl From<PayloadError> for Error
source§fn from(e: PayloadError) -> Error
fn from(e: PayloadError) -> Error
Converts to this type from the input type.
source§impl From<StateError> for Error
impl From<StateError> for Error
source§fn from(e: StateError) -> Error
fn from(e: StateError) -> Error
Converts to this type from the input type.
source§impl From<WebSocketError> for Error
impl From<WebSocketError> for Error
source§fn from(e: WebSocketError) -> Error
fn from(e: WebSocketError) -> Error
Converts to this type from the input type.
source§impl IntoResponse for Error
impl IntoResponse for Error
Auto Trait Implementations§
impl !Freeze for Error
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