Enum MmdvmError
#[non_exhaustive]pub enum MmdvmError {
FrameTooShort {
len: usize,
},
InvalidStartByte {
got: u8,
},
InvalidLength {
len: u8,
},
PayloadTooLarge {
len: usize,
},
UnknownNakReason {
code: u8,
},
InvalidStatusLength {
len: usize,
min: usize,
},
InvalidVersionResponse,
}Expand description
Errors produced by the MMDVM codec.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
FrameTooShort
Frame is shorter than the minimum 3 bytes.
InvalidStartByte
The first byte is not 0xE0.
InvalidLength
The length field is less than 3.
PayloadTooLarge
Payload is larger than the single-byte length field can encode.
UnknownNakReason
An unknown NAK reason code was received.
InvalidStatusLength
Status response was too short to parse.
InvalidVersionResponse
Version response payload was malformed.
Trait Implementations§
§impl Clone for MmdvmError
impl Clone for MmdvmError
§fn clone(&self) -> MmdvmError
fn clone(&self) -> MmdvmError
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 more§impl Debug for MmdvmError
impl Debug for MmdvmError
§impl Display for MmdvmError
impl Display for MmdvmError
§impl Error for MmdvmError
impl Error for MmdvmError
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()
§impl PartialEq for MmdvmError
impl PartialEq for MmdvmError
impl Eq for MmdvmError
impl StructuralPartialEq for MmdvmError
Auto Trait Implementations§
impl Freeze for MmdvmError
impl RefUnwindSafe for MmdvmError
impl Send for MmdvmError
impl Sync for MmdvmError
impl Unpin for MmdvmError
impl UnwindSafe for MmdvmError
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