Struct etherparse::DoubleVlanHeaderSlice
source · pub struct DoubleVlanHeaderSlice<'a> { /* private fields */ }
Expand description
A slice containing an double vlan header of a network package.
Implementations§
source§impl<'a> DoubleVlanHeaderSlice<'a>
impl<'a> DoubleVlanHeaderSlice<'a>
sourcepub fn from_slice(
slice: &'a [u8]
) -> Result<DoubleVlanHeaderSlice<'a>, ReadError>
pub fn from_slice(
slice: &'a [u8]
) -> Result<DoubleVlanHeaderSlice<'a>, ReadError>
Creates a double header slice from a slice.
sourcepub fn outer(&self) -> SingleVlanHeaderSlice<'a>
pub fn outer(&self) -> SingleVlanHeaderSlice<'a>
Returns a slice with the outer vlan header
sourcepub fn inner(&self) -> SingleVlanHeaderSlice<'a>
pub fn inner(&self) -> SingleVlanHeaderSlice<'a>
Returns a slice with the inner vlan header.
sourcepub fn to_header(&self) -> DoubleVlanHeader
pub fn to_header(&self) -> DoubleVlanHeader
Decode all the fields and copy the results to a DoubleVlanHeader struct
Trait Implementations§
source§impl<'a> Clone for DoubleVlanHeaderSlice<'a>
impl<'a> Clone for DoubleVlanHeaderSlice<'a>
source§fn clone(&self) -> DoubleVlanHeaderSlice<'a>
fn clone(&self) -> DoubleVlanHeaderSlice<'a>
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 more