pub struct HandlerError { /* private fields */ }
Expand description
The HandlerError
struct can be use to abstract any Err
of the handler method Result
.
The HandlerError
object can be generated From
any object that supports Display
,
Send,
Sync, and
Debug. This allows handler functions to return any error using the
?syntax. For example
let _age_num: u8 = e.age.parse()?;will return the
Implementations§
Source§impl HandlerError
impl HandlerError
Trait Implementations§
Source§impl Debug for HandlerError
impl Debug for HandlerError
Source§impl Display for HandlerError
impl Display for HandlerError
Source§impl Error for HandlerError
impl Error for HandlerError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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<&str> for HandlerError
impl From<&str> for HandlerError
Source§impl From<AddrParseError> for HandlerError
impl From<AddrParseError> for HandlerError
Source§fn from(e: AddrParseError) -> Self
fn from(e: AddrParseError) -> Self
Converts to this type from the input type.
Source§impl From<BorrowError> for HandlerError
impl From<BorrowError> for HandlerError
Source§fn from(e: BorrowError) -> Self
fn from(e: BorrowError) -> Self
Converts to this type from the input type.
Source§impl From<BorrowMutError> for HandlerError
impl From<BorrowMutError> for HandlerError
Source§fn from(e: BorrowMutError) -> Self
fn from(e: BorrowMutError) -> Self
Converts to this type from the input type.
Source§impl From<DecodeUtf16Error> for HandlerError
impl From<DecodeUtf16Error> for HandlerError
Source§fn from(e: DecodeUtf16Error) -> Self
fn from(e: DecodeUtf16Error) -> Self
Converts to this type from the input type.
Source§impl From<Error> for HandlerError
impl From<Error> for HandlerError
Source§impl From<Error> for HandlerError
impl From<Error> for HandlerError
Source§impl From<FromBytesWithNulError> for HandlerError
impl From<FromBytesWithNulError> for HandlerError
Source§fn from(e: FromBytesWithNulError) -> Self
fn from(e: FromBytesWithNulError) -> Self
Converts to this type from the input type.
Source§impl From<FromUtf16Error> for HandlerError
impl From<FromUtf16Error> for HandlerError
Source§fn from(e: FromUtf16Error) -> Self
fn from(e: FromUtf16Error) -> Self
Converts to this type from the input type.
Source§impl From<FromUtf8Error> for HandlerError
impl From<FromUtf8Error> for HandlerError
Source§fn from(e: FromUtf8Error) -> Self
fn from(e: FromUtf8Error) -> Self
Converts to this type from the input type.
Source§impl From<Infallible> for HandlerError
impl From<Infallible> for HandlerError
Source§fn from(e: ParseError) -> Self
fn from(e: ParseError) -> Self
Converts to this type from the input type.
Source§impl From<IntoStringError> for HandlerError
impl From<IntoStringError> for HandlerError
Source§fn from(e: IntoStringError) -> Self
fn from(e: IntoStringError) -> Self
Converts to this type from the input type.
Source§impl From<JoinPathsError> for HandlerError
impl From<JoinPathsError> for HandlerError
Source§fn from(e: JoinPathsError) -> Self
fn from(e: JoinPathsError) -> Self
Converts to this type from the input type.
Source§impl From<LayoutError> for HandlerError
impl From<LayoutError> for HandlerError
Source§impl From<NulError> for HandlerError
impl From<NulError> for HandlerError
Source§impl From<ParseBoolError> for HandlerError
impl From<ParseBoolError> for HandlerError
Source§fn from(e: ParseBoolError) -> Self
fn from(e: ParseBoolError) -> Self
Converts to this type from the input type.
Source§impl From<ParseCharError> for HandlerError
impl From<ParseCharError> for HandlerError
Source§fn from(e: ParseCharError) -> Self
fn from(e: ParseCharError) -> Self
Converts to this type from the input type.
Source§impl From<ParseFloatError> for HandlerError
impl From<ParseFloatError> for HandlerError
Source§fn from(e: ParseFloatError) -> Self
fn from(e: ParseFloatError) -> Self
Converts to this type from the input type.
Source§impl From<ParseIntError> for HandlerError
impl From<ParseIntError> for HandlerError
Source§fn from(e: ParseIntError) -> Self
fn from(e: ParseIntError) -> Self
Converts to this type from the input type.
Source§impl From<RecvError> for HandlerError
impl From<RecvError> for HandlerError
Source§impl From<RecvTimeoutError> for HandlerError
impl From<RecvTimeoutError> for HandlerError
Source§fn from(e: RecvTimeoutError) -> Self
fn from(e: RecvTimeoutError) -> Self
Converts to this type from the input type.
Source§impl From<StripPrefixError> for HandlerError
impl From<StripPrefixError> for HandlerError
Source§fn from(e: StripPrefixError) -> Self
fn from(e: StripPrefixError) -> Self
Converts to this type from the input type.
Source§impl From<SystemTimeError> for HandlerError
impl From<SystemTimeError> for HandlerError
Source§fn from(e: SystemTimeError) -> Self
fn from(e: SystemTimeError) -> Self
Converts to this type from the input type.
Source§impl From<TryRecvError> for HandlerError
impl From<TryRecvError> for HandlerError
Source§fn from(e: TryRecvError) -> Self
fn from(e: TryRecvError) -> Self
Converts to this type from the input type.
Source§impl From<Utf8Error> for HandlerError
impl From<Utf8Error> for HandlerError
Source§impl From<VarError> for HandlerError
impl From<VarError> for HandlerError
Source§impl LambdaErrorExt for HandlerError
impl LambdaErrorExt for HandlerError
Source§fn error_type(&self) -> &str
fn error_type(&self) -> &str
The value for this field should be an alphanumeric unique identifier
of the error type. For example
MyCustomError
. Read moreAuto 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
Source§impl<E> Fail for E
impl<E> Fail for E
Source§fn cause(&self) -> Option<&(dyn Fail + 'static)>
fn cause(&self) -> Option<&(dyn Fail + 'static)>
Returns a reference to the underlying cause of this failure, if it
is an error that wraps other errors. Read more
Source§fn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
Returns a reference to the
Backtrace
carried by this failure, if it
carries one. Read more