pub struct HandlerError<E: HandlerCode = u8> { /* private fields */ }Expand description
The standard error type returned by handlers.
Implementations§
source§impl<E: HandlerCode> HandlerError<E>
impl<E: HandlerCode> HandlerError<E>
sourcepub fn new_with_code(code: E, msg: String) -> Self
pub fn new_with_code(code: E, msg: String) -> Self
Create a new error message with a code.
sourcepub fn new_fmt_with_code(code: E, args: Arguments<'_>) -> Self
pub fn new_fmt_with_code(code: E, args: Arguments<'_>) -> Self
Format a new error message with a code.
sourcepub fn new_from_code(code: E) -> Self
pub fn new_from_code(code: E) -> Self
Format a new error message with a code.
Trait Implementations§
source§impl<E: Clone + HandlerCode> Clone for HandlerError<E>
impl<E: Clone + HandlerCode> Clone for HandlerError<E>
source§fn clone(&self) -> HandlerError<E>
fn clone(&self) -> HandlerError<E>
Returns a copy 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: HandlerCode> Debug for HandlerError<E>
impl<E: HandlerCode> Debug for HandlerError<E>
source§impl<E: HandlerCode> Display for HandlerError<E>
impl<E: HandlerCode> Display for HandlerError<E>
source§impl<E: Error, F: HandlerCode> From<E> for HandlerError<F>
impl<E: Error, F: HandlerCode> From<E> for HandlerError<F>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)