Struct etherparse::LinuxNonstandardEtherType
source · pub struct LinuxNonstandardEtherType(/* private fields */);
Expand description
Represents an non standard ethertype. These are defined in the Linux kernel with ids under 1500 so they don’t clash with the standard ones.
You can convert any valid u16
value to an LinuxNonstandardEtherType
and
the other way around.
use etherparse::LinuxNonstandardEtherType;
// Convert to LinuxNonstandardEtherType using the from & into trait
let link_type: LinuxNonstandardEtherType = 0x0001.try_into().unwrap();
assert_eq!(LinuxNonstandardEtherType::N802_3, link_type);
// convert to u16 using the from & into trait
let num: u16 = LinuxNonstandardEtherType::N802_3.try_into().unwrap();
assert_eq!(0x0001, num);
Implementations§
source§impl LinuxNonstandardEtherType
impl LinuxNonstandardEtherType
pub const N802_3: LinuxNonstandardEtherType = _
pub const AX25: LinuxNonstandardEtherType = _
pub const ALL: LinuxNonstandardEtherType = _
pub const N802_2: LinuxNonstandardEtherType = _
pub const SNAP: LinuxNonstandardEtherType = _
pub const DDCMP: LinuxNonstandardEtherType = _
pub const WAN_PPP: LinuxNonstandardEtherType = _
pub const PPP_MP: LinuxNonstandardEtherType = _
pub const LOCALTALK: LinuxNonstandardEtherType = _
pub const CAN: LinuxNonstandardEtherType = _
pub const CANFD: LinuxNonstandardEtherType = _
pub const CANXL: LinuxNonstandardEtherType = _
pub const PPPTALK: LinuxNonstandardEtherType = _
pub const TR_802_2: LinuxNonstandardEtherType = _
pub const MOBITEX: LinuxNonstandardEtherType = _
pub const CONTROL: LinuxNonstandardEtherType = _
pub const IRDA: LinuxNonstandardEtherType = _
pub const ECONET: LinuxNonstandardEtherType = _
pub const HDLC: LinuxNonstandardEtherType = _
pub const ARCNET: LinuxNonstandardEtherType = _
pub const DSA: LinuxNonstandardEtherType = _
pub const TRAILER: LinuxNonstandardEtherType = _
pub const PHONET: LinuxNonstandardEtherType = _
pub const IEEE802154: LinuxNonstandardEtherType = _
pub const CAIF: LinuxNonstandardEtherType = _
pub const XDSA: LinuxNonstandardEtherType = _
pub const MAP: LinuxNonstandardEtherType = _
pub const MCTP: LinuxNonstandardEtherType = _
Trait Implementations§
source§impl Clone for LinuxNonstandardEtherType
impl Clone for LinuxNonstandardEtherType
source§fn clone(&self) -> LinuxNonstandardEtherType
fn clone(&self) -> LinuxNonstandardEtherType
Returns a copy 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 moresource§impl Debug for LinuxNonstandardEtherType
impl Debug for LinuxNonstandardEtherType
source§impl Default for LinuxNonstandardEtherType
impl Default for LinuxNonstandardEtherType
source§impl From<LinuxNonstandardEtherType> for u16
impl From<LinuxNonstandardEtherType> for u16
source§fn from(val: LinuxNonstandardEtherType) -> Self
fn from(val: LinuxNonstandardEtherType) -> Self
Converts to this type from the input type.
source§impl TryFrom<u16> for LinuxNonstandardEtherType
impl TryFrom<u16> for LinuxNonstandardEtherType
impl Copy for LinuxNonstandardEtherType
impl Eq for LinuxNonstandardEtherType
impl StructuralPartialEq for LinuxNonstandardEtherType
Auto Trait Implementations§
impl Freeze for LinuxNonstandardEtherType
impl RefUnwindSafe for LinuxNonstandardEtherType
impl Send for LinuxNonstandardEtherType
impl Sync for LinuxNonstandardEtherType
impl Unpin for LinuxNonstandardEtherType
impl UnwindSafe for LinuxNonstandardEtherType
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)