Struct etherparse::SingleVlanHeader [−][src]
pub struct SingleVlanHeader { pub priority_code_point: u8, pub drop_eligible_indicator: bool, pub vlan_identifier: u16, pub ether_type: u16, }
IEEE 802.1Q VLAN Tagging Header
Fields
priority_code_point: u8
A 3 bit number which refers to the IEEE 802.1p class of service and maps to the frame priority level.
drop_eligible_indicator: bool
Indicate that the frame may be dropped under the presence of congestion.
vlan_identifier: u16
12 bits vland identifier.
ether_type: u16
"Tag protocol identifier": Type id of content after this header. Refer to the "EtherType" for a list of possible supported values.
Methods
impl SingleVlanHeader
[src]
impl SingleVlanHeader
pub fn read<T: Read + Seek + Sized>(
reader: &mut T
) -> Result<SingleVlanHeader, Error>
[src]
pub fn read<T: Read + Seek + Sized>(
reader: &mut T
) -> Result<SingleVlanHeader, Error>
Read a IEEE 802.1Q VLAN tagging header
pub fn write<T: Write + Sized>(&self, writer: &mut T) -> Result<(), WriteError>
[src]
pub fn write<T: Write + Sized>(&self, writer: &mut T) -> Result<(), WriteError>
Write the IEEE 802.1Q VLAN tagging header
Trait Implementations
impl Clone for SingleVlanHeader
[src]
impl Clone for SingleVlanHeader
fn clone(&self) -> SingleVlanHeader
[src]
fn clone(&self) -> SingleVlanHeader
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)
Performs copy-assignment from source
. Read more
impl Debug for SingleVlanHeader
[src]
impl Debug for SingleVlanHeader
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 SingleVlanHeader
[src]
impl Eq for SingleVlanHeader
impl PartialEq for SingleVlanHeader
[src]
impl PartialEq for SingleVlanHeader
fn eq(&self, other: &SingleVlanHeader) -> bool
[src]
fn eq(&self, other: &SingleVlanHeader) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &SingleVlanHeader) -> bool
[src]
fn ne(&self, other: &SingleVlanHeader) -> bool
This method tests for !=
.
impl Default for SingleVlanHeader
[src]
impl Default for SingleVlanHeader
fn default() -> SingleVlanHeader
[src]
fn default() -> SingleVlanHeader
Returns the "default value" for a type. Read more
impl SerializedSize for SingleVlanHeader
[src]
impl SerializedSize for SingleVlanHeader
const SERIALIZED_SIZE: usize
SERIALIZED_SIZE: usize = 4
Serialized size of the header in bytes.
Auto Trait Implementations
impl Send for SingleVlanHeader
impl Send for SingleVlanHeader
impl Sync for SingleVlanHeader
impl Sync for SingleVlanHeader