pub enum DecodeError<'a> {
AddressTooLong {
field: AddressField,
length: u8,
dnet: Option<u16>,
source: Option<Address<'a>>,
},
Malformed(Malformed),
}Expand description
Why Npdu::decode refused a frame.
The two cases are the split a router acts on: an over-long address draws
a reject, anything else is dropped. So the enum is exhaustive, and a new
fault joins Malformed, which is #[non_exhaustive].
Variants§
AddressTooLong
A DLEN or SLEN past MAX_MAC_LEN: an address no data link uses,
which draws reject reason 6 (Clause 6.4.4) if the frame names a DNET.
Fields
§
field: AddressFieldWhich address’s length octet it is.
Malformed(Malformed)
Anything else.
Trait Implementations§
Source§impl<'a> Clone for DecodeError<'a>
impl<'a> Clone for DecodeError<'a>
impl<'a> Copy for DecodeError<'a>
Source§impl<'a> Debug for DecodeError<'a>
impl<'a> Debug for DecodeError<'a>
Source§impl Display for DecodeError<'_>
impl Display for DecodeError<'_>
impl<'a> Eq for DecodeError<'a>
Source§impl Error for DecodeError<'_>
impl Error for DecodeError<'_>
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<Malformed> for DecodeError<'_>
impl From<Malformed> for DecodeError<'_>
Source§impl<'a> PartialEq for DecodeError<'a>
impl<'a> PartialEq for DecodeError<'a>
impl<'a> StructuralPartialEq for DecodeError<'a>
Auto Trait Implementations§
impl<'a> Freeze for DecodeError<'a>
impl<'a> RefUnwindSafe for DecodeError<'a>
impl<'a> Send for DecodeError<'a>
impl<'a> Sync for DecodeError<'a>
impl<'a> Unpin for DecodeError<'a>
impl<'a> UnsafeUnpin for DecodeError<'a>
impl<'a> UnwindSafe for DecodeError<'a>
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