pub enum DataFieldError {
SizeMismatch,
InvalidLayout,
SecondaryHeaderAbsent,
}Expand description
An error that occurs when setting or getting the typed data field.
Variants§
SizeMismatch
The size of the provided data does not match the size of the packet’s data field.
InvalidLayout
The packet’s data field could not be safely cast to the target data type, often due to alignment issues or an invalid discriminant.
SecondaryHeaderAbsent
A secondary header was requested but the secondary header flag is absent.
Trait Implementations§
Source§impl Clone for DataFieldError
impl Clone for DataFieldError
Source§fn clone(&self) -> DataFieldError
fn clone(&self) -> DataFieldError
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 DataFieldError
impl Debug for DataFieldError
Source§impl Display for DataFieldError
impl Display for DataFieldError
Source§impl Error for DataFieldError
impl Error for DataFieldError
1.30.0 · 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<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.
Source§impl Hash for DataFieldError
impl Hash for DataFieldError
Source§impl PartialEq for DataFieldError
impl PartialEq for DataFieldError
impl Copy for DataFieldError
impl Eq for DataFieldError
impl StructuralPartialEq for DataFieldError
Auto Trait Implementations§
impl Freeze for DataFieldError
impl RefUnwindSafe for DataFieldError
impl Send for DataFieldError
impl Sync for DataFieldError
impl Unpin for DataFieldError
impl UnsafeUnpin for DataFieldError
impl UnwindSafe for DataFieldError
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