pub(crate) enum PacketParseError {
TooShort,
LengthMismatch {
declared: u8,
actual: usize,
},
BadCrc,
}Expand description
Errors that can arise while parsing a response frame.
Variants§
TooShort
The received slice is shorter than the minimum 4-byte response.
LengthMismatch
The count byte does not match the actual slice length.
Fields
BadCrc
The trailing CRC does not match a CRC computed over the rest of the frame.
Trait Implementations§
Source§impl Clone for PacketParseError
impl Clone for PacketParseError
Source§fn clone(&self) -> PacketParseError
fn clone(&self) -> PacketParseError
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 Debug for PacketParseError
impl Debug for PacketParseError
Source§impl PartialEq for PacketParseError
impl PartialEq for PacketParseError
impl Copy for PacketParseError
impl Eq for PacketParseError
impl StructuralPartialEq for PacketParseError
Auto Trait Implementations§
impl Freeze for PacketParseError
impl RefUnwindSafe for PacketParseError
impl Send for PacketParseError
impl Sync for PacketParseError
impl Unpin for PacketParseError
impl UnsafeUnpin for PacketParseError
impl UnwindSafe for PacketParseError
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