pub struct MutableVlanPacket<'a> { /* private fields */ }Expand description
Represents a mutable VLAN packet.
Implementations§
Source§impl<'a> MutableVlanPacket<'a>
impl<'a> MutableVlanPacket<'a>
pub fn new_unchecked(buffer: &'a mut [u8]) -> Self
pub fn get_priority_code_point(&self) -> ClassOfService
pub fn set_priority_code_point(&mut self, class: ClassOfService)
pub fn get_drop_eligible_id(&self) -> u1
pub fn set_drop_eligible_id(&mut self, dei: u1)
pub fn get_vlan_id(&self) -> u16
pub fn set_vlan_id(&mut self, id: u16)
pub fn get_ethertype(&self) -> EtherType
pub fn set_ethertype(&mut self, ty: EtherType)
Trait Implementations§
Source§impl<'a> MutablePacket<'a> for MutableVlanPacket<'a>
impl<'a> MutablePacket<'a> for MutableVlanPacket<'a>
Source§type Packet = VlanPacket
type Packet = VlanPacket
The immutable packet type associated with this mutable view.
Source§fn new(buffer: &'a mut [u8]) -> Option<Self>
fn new(buffer: &'a mut [u8]) -> Option<Self>
Construct a mutable packet from the provided buffer.
Source§fn packet_mut(&mut self) -> &mut [u8] ⓘ
fn packet_mut(&mut self) -> &mut [u8] ⓘ
Get a mutable view over the entire packet buffer.
Source§fn header_mut(&mut self) -> &mut [u8] ⓘ
fn header_mut(&mut self) -> &mut [u8] ⓘ
Get a mutable view over the serialized header bytes of the packet.
Source§fn payload_mut(&mut self) -> &mut [u8] ⓘ
fn payload_mut(&mut self) -> &mut [u8] ⓘ
Get a mutable view over the payload bytes of the packet.
Auto Trait Implementations§
impl<'a> Freeze for MutableVlanPacket<'a>
impl<'a> RefUnwindSafe for MutableVlanPacket<'a>
impl<'a> Send for MutableVlanPacket<'a>
impl<'a> Sync for MutableVlanPacket<'a>
impl<'a> Unpin for MutableVlanPacket<'a>
impl<'a> !UnwindSafe for MutableVlanPacket<'a>
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