pub enum DatagramError {
Incomplete,
NoSync,
InvalidCrc,
InvalidHeader,
InvalidPayload,
ExceedsMaxUdpPayload(u16),
}Expand description
Error type for single-datagram parsing via parse_datagram.
Variants§
Incomplete
Not enough data to parse a complete message.
NoSync
No sync sequence (“$@”) found in the input.
InvalidCrc
CRC validation failed.
InvalidHeader
Invalid header (bad length).
InvalidPayload
Failed to deserialize the message payload.
ExceedsMaxUdpPayload(u16)
Message length exceeds max UDP payload size (65527 bytes).
Trait Implementations§
Source§impl Clone for DatagramError
impl Clone for DatagramError
Source§fn clone(&self) -> DatagramError
fn clone(&self) -> DatagramError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DatagramError
impl Debug for DatagramError
Source§impl PartialEq for DatagramError
impl PartialEq for DatagramError
Source§fn eq(&self, other: &DatagramError) -> bool
fn eq(&self, other: &DatagramError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for DatagramError
impl Eq for DatagramError
impl StructuralPartialEq for DatagramError
Auto Trait Implementations§
impl Freeze for DatagramError
impl RefUnwindSafe for DatagramError
impl Send for DatagramError
impl Sync for DatagramError
impl Unpin for DatagramError
impl UnsafeUnpin for DatagramError
impl UnwindSafe for DatagramError
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