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