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