#[non_exhaustive]pub enum TypeField {
NextHeader {
h_len: u8,
h_type: u8,
},
EtherType(u16),
}Expand description
A decoded ULE Type field (RFC 4326 §4.4).
Type < 0x0600 is a TypeField::NextHeader (the start of an extension
header); Type >= 0x0600 is a TypeField::EtherType naming the PDU that
directly follows the Type field.
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.
NextHeader
A Next-Header: H-LEN (3 bits) + H-Type (8 bits), with the 5-bit
zero prefix that keeps the raw value < 0x0600.
Fields
EtherType(u16)
An EtherType (>= 0x0600) of the carried PDU (RFC 4326 §4.4.2).
Implementations§
Trait Implementations§
impl Copy for TypeField
impl Eq for TypeField
impl StructuralPartialEq for TypeField
Auto Trait Implementations§
impl Freeze for TypeField
impl RefUnwindSafe for TypeField
impl Send for TypeField
impl Sync for TypeField
impl Unpin for TypeField
impl UnsafeUnpin for TypeField
impl UnwindSafe for TypeField
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