pub enum HdlcError {
MissingFlag,
Truncated,
InvalidFormatType,
LengthMismatch,
AddressTooLong,
BadHcs,
BadFcs,
UnknownControl(u8),
}Expand description
Errors that can occur while decoding an HDLC frame.
Variants§
MissingFlag
The buffer did not begin and end with the flag octet.
Truncated
The frame is shorter than the minimum, or shorter than its length field.
InvalidFormatType
The frame format type nibble was not 0xA (type 3).
LengthMismatch
The declared frame length did not match the actual length.
AddressTooLong
An address field did not terminate within four octets.
BadHcs
The header check sequence did not match.
BadFcs
The frame check sequence did not match.
UnknownControl(u8)
The control field did not encode a known frame type.
Trait Implementations§
impl Eq for HdlcError
Source§impl Error for HdlcError
impl Error for HdlcError
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 StructuralPartialEq for HdlcError
Auto Trait Implementations§
impl Freeze for HdlcError
impl RefUnwindSafe for HdlcError
impl Send for HdlcError
impl Sync for HdlcError
impl Unpin for HdlcError
impl UnsafeUnpin for HdlcError
impl UnwindSafe for HdlcError
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