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§

source

fn packet_mut(&mut self) -> &mut [u8]

Retrieve the underlying, mutable, buffer for the packet.

source

fn payload_mut(&mut self) -> &mut [u8]

Retrieve the mutable payload for the packet.

Provided Methods§

source

fn clone_from<T: Packet>(&mut self, other: &T)

Initialize this packet by cloning another.

Implementors§