pub enum CrcError {
Build(BuilderError),
BufferTooSmall {
required: usize,
provided: usize,
},
ValidationFailed {
expected: u16,
calculated: u16,
},
DataField(DataFieldError),
}Expand description
An error related to CRC operations.
Variants§
Build(BuilderError)
An error occurred during the underlying packet build.
BufferTooSmall
The buffer was too small to hold the packet and its CRC.
ValidationFailed
The calculated CRC did not match the one in the buffer.
Fields
DataField(DataFieldError)
An error occurred parsing the underlying data field.
Trait Implementations§
Source§impl From<BuilderError> for CrcError
impl From<BuilderError> for CrcError
Source§fn from(e: BuilderError) -> Self
fn from(e: BuilderError) -> Self
Converts to this type from the input type.
Source§impl From<DataFieldError> for CrcError
impl From<DataFieldError> for CrcError
Source§fn from(e: DataFieldError) -> Self
fn from(e: DataFieldError) -> Self
Converts to this type from the input type.
impl Copy for CrcError
impl Eq for CrcError
impl StructuralPartialEq for CrcError
Auto Trait Implementations§
impl Freeze for CrcError
impl RefUnwindSafe for CrcError
impl Send for CrcError
impl Sync for CrcError
impl Unpin for CrcError
impl UnsafeUnpin for CrcError
impl UnwindSafe for CrcError
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