pub enum HandlerError {
Custom(StatusCode, Option<String>),
Serialization(Error),
}Expand description
A standard error type for handler methods, consisting of an HTTP status code and an optional, more specific error message.
Variants§
Custom(StatusCode, Option<String>)
A custom error with a status code and message.
Serialization(Error)
An error that occurred during response serialization.
Trait Implementations§
Source§impl Debug for HandlerError
impl Debug for HandlerError
Source§impl From<(StatusCode, Option<String>)> for HandlerError
impl From<(StatusCode, Option<String>)> for HandlerError
Auto Trait Implementations§
impl Freeze for HandlerError
impl !RefUnwindSafe for HandlerError
impl Send for HandlerError
impl Sync for HandlerError
impl Unpin for HandlerError
impl !UnwindSafe for HandlerError
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