Trait pnet_macros_support::packet::MutablePacket
source · [−]pub trait MutablePacket: Packet {
fn packet_mut(&mut self) -> &mut [u8];
fn payload_mut(&mut self) -> &mut [u8];
fn clone_from<T: Packet>(&mut self, other: &T) { ... }
}
Expand description
Represents a generic, mutable, network packet.
Required Methods
fn packet_mut(&mut self) -> &mut [u8]
fn packet_mut(&mut self) -> &mut [u8]
Retreive the underlying, mutable, buffer for the packet.
fn payload_mut(&mut self) -> &mut [u8]
fn payload_mut(&mut self) -> &mut [u8]
Retreive the mutable payload for the packet.
Provided Methods
fn clone_from<T: Packet>(&mut self, other: &T)
fn clone_from<T: Packet>(&mut self, other: &T)
Initialize this packet by cloning another.