Struct etherparse::Ethernet2Header [−][src]
Ethernet II header.
Fields
source: [u8; 6]
destination: [u8; 6]
ether_type: u16
Methods
impl Ethernet2Header
[src]
impl Ethernet2Header
pub fn read<T: Read + Seek + Sized>(
reader: &mut T
) -> Result<Ethernet2Header, Error>
[src]
pub fn read<T: Read + Seek + Sized>(
reader: &mut T
) -> Result<Ethernet2Header, Error>
Reads an Ethernet-II header from the current position of the read argument.
pub fn write<T: Write + Sized>(&self, writer: &mut T) -> Result<(), Error>
[src]
pub fn write<T: Write + Sized>(&self, writer: &mut T) -> Result<(), Error>
Writes a given Ethernet-II header to the current position of the write argument.
Trait Implementations
impl Clone for Ethernet2Header
[src]
impl Clone for Ethernet2Header
fn clone(&self) -> Ethernet2Header
[src]
fn clone(&self) -> Ethernet2Header
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for Ethernet2Header
[src]
impl Debug for Ethernet2Header
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Eq for Ethernet2Header
[src]
impl Eq for Ethernet2Header
impl PartialEq for Ethernet2Header
[src]
impl PartialEq for Ethernet2Header
fn eq(&self, other: &Ethernet2Header) -> bool
[src]
fn eq(&self, other: &Ethernet2Header) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Ethernet2Header) -> bool
[src]
fn ne(&self, other: &Ethernet2Header) -> bool
This method tests for !=
.
impl Default for Ethernet2Header
[src]
impl Default for Ethernet2Header
fn default() -> Ethernet2Header
[src]
fn default() -> Ethernet2Header
Returns the "default value" for a type. Read more
impl SerializedSize for Ethernet2Header
[src]
impl SerializedSize for Ethernet2Header
const SERIALIZED_SIZE: usize
SERIALIZED_SIZE: usize = 14
Serialized size of the header in bytes.
Auto Trait Implementations
impl Send for Ethernet2Header
impl Send for Ethernet2Header
impl Sync for Ethernet2Header
impl Sync for Ethernet2Header