pub enum AuxDecodeError {
TooShort,
BadMagic,
UnsupportedVersion(u8),
UnknownChannel(u8),
LengthMismatch {
declared: usize,
actual: usize,
},
TooLong(usize),
}Expand description
Why a frame could not be decoded. Distinct variants so a caller can count them separately: foreign traffic on a shared lane is normal, whereas a truncated frame of ours points at a real transport fault.
Variants§
TooShort
Shorter than the fixed header.
BadMagic
Magic did not match: almost certainly not our frame.
UnsupportedVersion(u8)
A version this build does not speak.
UnknownChannel(u8)
A channel this build does not know.
LengthMismatch
The declared length does not match the bytes actually present.
TooLong(usize)
The declared length exceeds AUX_MAX_PAYLOAD.
Trait Implementations§
Source§impl Clone for AuxDecodeError
impl Clone for AuxDecodeError
impl Copy for AuxDecodeError
Source§impl Debug for AuxDecodeError
impl Debug for AuxDecodeError
impl Eq for AuxDecodeError
Source§impl PartialEq for AuxDecodeError
impl PartialEq for AuxDecodeError
impl StructuralPartialEq for AuxDecodeError
Auto Trait Implementations§
impl Freeze for AuxDecodeError
impl RefUnwindSafe for AuxDecodeError
impl Send for AuxDecodeError
impl Sync for AuxDecodeError
impl Unpin for AuxDecodeError
impl UnsafeUnpin for AuxDecodeError
impl UnwindSafe for AuxDecodeError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.