pub enum PacketError {
TooShort(usize),
CrcMismatch {
expected: [u8; 2],
found: [u8; 2],
},
NotMyId(u8),
Exeption(u8, Exception),
}Expand description
Error types for received packet while analyzing it.
Variants§
TooShort(usize)
Packet is too short to analyze
CrcMismatch
Given CRC bytes are mismatched with the expected one
NotMyId(u8)
Packet is from unexpected ID
Exeption(u8, Exception)
Device reported exception code
Trait Implementations§
Source§impl Clone for PacketError
impl Clone for PacketError
Source§fn clone(&self) -> PacketError
fn clone(&self) -> PacketError
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 Debug for PacketError
impl Debug for PacketError
Source§impl PartialEq for PacketError
impl PartialEq for PacketError
impl Copy for PacketError
impl Eq for PacketError
impl StructuralPartialEq for PacketError
Auto Trait Implementations§
impl Freeze for PacketError
impl RefUnwindSafe for PacketError
impl Send for PacketError
impl Sync for PacketError
impl Unpin for PacketError
impl UnwindSafe for PacketError
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