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>(&mut self, other: &T)
where T: Packet { ... }
}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>(&mut self, other: &T)where
T: Packet,
fn clone_from<T>(&mut self, other: &T)where
T: Packet,
Initialize this packet by cloning another.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".