#[non_exhaustive]pub enum ErrorCode<E: HandlerCode = u8> {
SystemCode(SystemCode),
HandlerCode(E),
Unknown(u16),
}
Expand description
Error and success codes returned by the message API.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
SystemCode(SystemCode)
A known system error code.
HandlerCode(E)
A custom error code returned by a handler.
Unknown(u16)
Unknown error code.
Trait Implementations§
Source§impl<E: HandlerCode> PartialEq for ErrorCode<E>
impl<E: HandlerCode> PartialEq for ErrorCode<E>
impl<E: Copy + HandlerCode> Copy for ErrorCode<E>
impl<E: HandlerCode> Eq for ErrorCode<E>
Auto Trait Implementations§
impl<E> Freeze for ErrorCode<E>where
E: Freeze,
impl<E> RefUnwindSafe for ErrorCode<E>where
E: RefUnwindSafe,
impl<E> Send for ErrorCode<E>where
E: Send,
impl<E> Sync for ErrorCode<E>where
E: Sync,
impl<E> Unpin for ErrorCode<E>where
E: Unpin,
impl<E> UnwindSafe for ErrorCode<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