Struct perseus::errors::GenericErrorWithCause
source · [−]pub struct GenericErrorWithCause {
pub error: Box<dyn Error + Send + Sync>,
pub cause: ErrorCause,
}
Expand description
An error that has an attached cause that blames either the client or the
server for its occurrence. You can convert any error into this with
.into()
or ?
, which will set the cause to the server by default,
resulting in a 500 Internal Server Error HTTP status code. If this isn’t
what you want, you’ll need to initialize this explicitly.
Fields
error: Box<dyn Error + Send + Sync>
The underlying error.
cause: ErrorCause
The cause of the error.
Trait Implementations
sourceimpl Debug for GenericErrorWithCause
impl Debug for GenericErrorWithCause
Auto Trait Implementations
impl !RefUnwindSafe for GenericErrorWithCause
impl Send for GenericErrorWithCause
impl Sync for GenericErrorWithCause
impl Unpin for GenericErrorWithCause
impl !UnwindSafe for GenericErrorWithCause
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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