pub enum AjazzError {
HidError(HidError),
Utf8Error(Utf8Error),
ImageError(ImageError),
JoinError(JoinError),
PoisonError,
InvalidKeyIndex(u8),
UnrecognizedPID(u16),
UnsupportedOperation,
BadData,
InvalidImageSize(usize, usize, usize, usize),
NoAck,
}Expand description
Errors that can occur while working with Ajazz devices
Variants§
HidError(HidError)
HidApi error
Utf8Error(Utf8Error)
Failed to convert bytes into string
ImageError(ImageError)
Failed to encode image
JoinError(JoinError)
Available on crate feature
async only.Tokio join error
PoisonError
Reader mutex was poisoned
InvalidKeyIndex(u8)
Key index is invalid
UnrecognizedPID(u16)
Unrecognized Product ID
UnsupportedOperation
The device doesn’t support doing that
BadData
Device sent unexpected data
InvalidImageSize(usize, usize, usize, usize)
Invalid image size
NoAck
Device didn’t respond with ACK
Trait Implementations§
Source§impl Debug for AjazzError
impl Debug for AjazzError
Source§impl Display for AjazzError
impl Display for AjazzError
Source§impl Error for AjazzError
impl Error for AjazzError
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<HidError> for AjazzError
impl From<HidError> for AjazzError
Source§impl From<ImageError> for AjazzError
impl From<ImageError> for AjazzError
Source§fn from(source: ImageError) -> Self
fn from(source: ImageError) -> Self
Converts to this type from the input type.
Source§impl From<JoinError> for AjazzError
impl From<JoinError> for AjazzError
Auto Trait Implementations§
impl Freeze for AjazzError
impl !RefUnwindSafe for AjazzError
impl Send for AjazzError
impl Sync for AjazzError
impl Unpin for AjazzError
impl !UnwindSafe for AjazzError
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