Enum etherparse::VlanHeader
source · pub enum VlanHeader {
Single(SingleVlanHeader),
Double(DoubleVlanHeader),
}
Expand description
IEEE 802.1Q VLAN Tagging Header (can be single or double tagged).
Variants§
Single(SingleVlanHeader)
IEEE 802.1Q VLAN Tagging Header
Double(DoubleVlanHeader)
IEEE 802.1Q double VLAN Tagging Header
Implementations§
source§impl VlanHeader
impl VlanHeader
sourcepub const VLAN_ETHER_TYPES: [EtherType; 3] = _
pub const VLAN_ETHER_TYPES: [EtherType; 3] = _
All ether types that identify a vlan header.
sourcepub fn write<T: Write + Sized>(&self, writer: &mut T) -> Result<(), Error>
Available on crate feature std
only.
pub fn write<T: Write + Sized>(&self, writer: &mut T) -> Result<(), Error>
std
only.Write the IEEE 802.1Q VLAN single or double tagging header
sourcepub fn next_header(&self) -> EtherType
pub fn next_header(&self) -> EtherType
Returns the ether type of the next header after the vlan header(s).
sourcepub fn header_len(&self) -> usize
pub fn header_len(&self) -> usize
Length of the serialized header(s) in bytes.
Trait Implementations§
source§impl Clone for VlanHeader
impl Clone for VlanHeader
source§fn clone(&self) -> VlanHeader
fn clone(&self) -> VlanHeader
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 moresource§impl Debug for VlanHeader
impl Debug for VlanHeader
source§impl PartialEq for VlanHeader
impl PartialEq for VlanHeader
source§fn eq(&self, other: &VlanHeader) -> bool
fn eq(&self, other: &VlanHeader) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for VlanHeader
impl StructuralPartialEq for VlanHeader
Auto Trait Implementations§
impl Freeze for VlanHeader
impl RefUnwindSafe for VlanHeader
impl Send for VlanHeader
impl Sync for VlanHeader
impl Unpin for VlanHeader
impl UnwindSafe for VlanHeader
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more