Struct etherparse::Ethernet2Header [−][src]
Expand description
Ethernet II header.
Fields
source: [u8; 6]
destination: [u8; 6]
ether_type: u16
Implementations
👎 Deprecated since 0.10.0: Use Ethernet2Header::from_slice instead.
Use Ethernet2Header::from_slice instead.
Creates a ethernet slice from an other slice.
Read an Ethernet2Header from a slice and return the header & unused parts of the slice.
Read an Ethernet2Header from a static sized byte array.
Reads an Ethernet-II header from the current position of the read argument.
Serialize the header to a given slice. Returns the unused part of the slice.
Writes a given Ethernet-II header to the current position of the write argument.
Length of the serialized header in bytes.
Trait Implementations
Returns the “default value” for a type. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Serialized size of the header in bytes.
Auto Trait Implementations
impl RefUnwindSafe for Ethernet2Header
impl Send for Ethernet2Header
impl Sync for Ethernet2Header
impl Unpin for Ethernet2Header
impl UnwindSafe for Ethernet2Header
Blanket Implementations
Mutably borrows from an owned value. Read more