pub struct HandlerError<E = u8>where
E: HandlerCode,{ /* private fields */ }Expand description
The standard error type returned by handlers.
Implementations§
Source§impl<E> HandlerError<E>where
E: HandlerCode,
impl<E> HandlerError<E>where
E: HandlerCode,
Sourcepub fn new(msg: String) -> HandlerError<E>
pub fn new(msg: String) -> HandlerError<E>
Create a new error message.
Sourcepub fn new_with_code(code: E, msg: String) -> HandlerError<E>
pub fn new_with_code(code: E, msg: String) -> HandlerError<E>
Create a new error message with a code.
Sourcepub fn new_fmt(args: Arguments<'_>) -> HandlerError<E>
pub fn new_fmt(args: Arguments<'_>) -> HandlerError<E>
Format a new error message.
Sourcepub fn new_fmt_with_code(code: E, args: Arguments<'_>) -> HandlerError<E>
pub fn new_fmt_with_code(code: E, args: Arguments<'_>) -> HandlerError<E>
Format a new error message with a code.
Sourcepub fn new_from_code(code: E) -> HandlerError<E>
pub fn new_from_code(code: E) -> HandlerError<E>
Format a new error message with a code.
Trait Implementations§
Source§impl<E> Clone for HandlerError<E>where
E: Clone + HandlerCode,
impl<E> Clone for HandlerError<E>where
E: Clone + HandlerCode,
Source§fn clone(&self) -> HandlerError<E>
fn clone(&self) -> HandlerError<E>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<E> Debug for HandlerError<E>where
E: HandlerCode,
impl<E> Debug for HandlerError<E>where
E: HandlerCode,
Source§impl<E> Display for HandlerError<E>where
E: HandlerCode,
impl<E> Display for HandlerError<E>where
E: HandlerCode,
Source§impl<E, F> From<E> for HandlerError<F>where
E: Error,
F: HandlerCode,
impl<E, F> From<E> for HandlerError<F>where
E: Error,
F: HandlerCode,
Source§fn from(value: E) -> HandlerError<F>
fn from(value: E) -> HandlerError<F>
Converts to this type from the input type.
Auto Trait Implementations§
impl<E> Freeze for HandlerError<E>where
E: Freeze,
impl<E> RefUnwindSafe for HandlerError<E>where
E: RefUnwindSafe,
impl<E> Send for HandlerError<E>where
E: Send,
impl<E> Sync for HandlerError<E>where
E: Sync,
impl<E> Unpin for HandlerError<E>where
E: Unpin,
impl<E> UnwindSafe for HandlerError<E>where
E: UnwindSafe,
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