Struct etherparse::Ethernet2Header [−][src]
Ethernet II header.
Fields
source: [u8; 6]
destination: [u8; 6]
ether_type: u16
Methods
impl Ethernet2Header[src]
impl Ethernet2Headerpub 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 Ethernet2Headerfn clone(&self) -> Ethernet2Header[src]
fn clone(&self) -> Ethernet2HeaderReturns 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 Ethernet2Headerfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Eq for Ethernet2Header[src]
impl Eq for Ethernet2Headerimpl PartialEq for Ethernet2Header[src]
impl PartialEq for Ethernet2Headerfn eq(&self, other: &Ethernet2Header) -> bool[src]
fn eq(&self, other: &Ethernet2Header) -> boolThis 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) -> boolThis method tests for !=.
impl SerializedSize for Ethernet2Header[src]
impl SerializedSize for Ethernet2Headerconst SERIALIZED_SIZE: usize
SERIALIZED_SIZE: usize = 14
Serialized size of the header in bytes.
Auto Trait Implementations
impl Send for Ethernet2Header
impl Send for Ethernet2Headerimpl Sync for Ethernet2Header
impl Sync for Ethernet2Header