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