pub struct VlanPacket {
pub header: VlanHeader,
pub payload: Bytes,
}Expand description
VLAN packet
Fields§
§header: VlanHeader§payload: BytesTrait Implementations§
Source§impl Clone for VlanPacket
impl Clone for VlanPacket
Source§fn clone(&self) -> VlanPacket
fn clone(&self) -> VlanPacket
Returns a duplicate 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 VlanPacket
impl Debug for VlanPacket
Source§impl Packet for VlanPacket
impl Packet for VlanPacket
type Header = VlanHeader
Source§fn from_bytes(bytes: Bytes) -> Option<Self>
fn from_bytes(bytes: Bytes) -> Option<Self>
Parse from raw bytes. (with ownership)
Source§fn header_len(&self) -> usize
fn header_len(&self) -> usize
Get the length of the header.
Source§fn payload_len(&self) -> usize
fn payload_len(&self) -> usize
Get the length of the payload.
fn into_parts(self) -> (Self::Header, Bytes)
Source§fn to_bytes_mut(&self) -> BytesMut
fn to_bytes_mut(&self) -> BytesMut
Convert the packet to a mutable byte buffer.
Source§fn header_mut(&self) -> BytesMut
fn header_mut(&self) -> BytesMut
Get a mutable byte buffer for the header.
Source§fn payload_mut(&self) -> BytesMut
fn payload_mut(&self) -> BytesMut
Get a mutable byte buffer for the payload.
Source§impl PartialEq for VlanPacket
impl PartialEq for VlanPacket
impl Eq for VlanPacket
impl StructuralPartialEq for VlanPacket
Auto Trait Implementations§
impl !Freeze for VlanPacket
impl RefUnwindSafe for VlanPacket
impl Send for VlanPacket
impl Sync for VlanPacket
impl Unpin for VlanPacket
impl UnwindSafe for VlanPacket
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