Struct etherparse::SingleVlanHeader [−][src]
IEEE 802.1Q VLAN Tagging Header
Fields
priority_code_point: u8A 3 bit number which refers to the IEEE 802.1p class of service and maps to the frame priority level.
drop_eligible_indicator: boolIndicate that the frame may be dropped under the presence of congestion.
vlan_identifier: u1612 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.
Implementations
impl SingleVlanHeader[src]
pub fn read_from_slice(
slice: &[u8]
) -> Result<(SingleVlanHeader, &[u8]), ReadError>[src]
slice: &[u8]
) -> Result<(SingleVlanHeader, &[u8]), ReadError>
Read an SingleVlanHeader from a slice and return the header & unused parts of the slice.
pub fn read<T: Read + Seek + Sized>(
reader: &mut T
) -> Result<SingleVlanHeader, Error>[src]
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]
Write the IEEE 802.1Q VLAN tagging header
Trait Implementations
impl Clone for SingleVlanHeader[src]
fn clone(&self) -> SingleVlanHeader[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for SingleVlanHeader[src]
impl Default for SingleVlanHeader[src]
fn default() -> SingleVlanHeader[src]
impl Eq for SingleVlanHeader[src]
impl PartialEq<SingleVlanHeader> for SingleVlanHeader[src]
fn eq(&self, other: &SingleVlanHeader) -> bool[src]
fn ne(&self, other: &SingleVlanHeader) -> bool[src]
impl SerializedSize for SingleVlanHeader[src]
const SERIALIZED_SIZE: usize[src]
Serialized size of the header in bytes.
impl StructuralEq for SingleVlanHeader[src]
impl StructuralPartialEq for SingleVlanHeader[src]
Auto Trait Implementations
impl RefUnwindSafe for SingleVlanHeader[src]
impl Send for SingleVlanHeader[src]
impl Sync for SingleVlanHeader[src]
impl Unpin for SingleVlanHeader[src]
impl UnwindSafe for SingleVlanHeader[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,