pub trait ServerPacket: ReadFrom {
// Provided method
fn read_packet(data: &mut Cursor<&[u8]>) -> Result<Self, PacketError> { ... }
}Expand description
A trait for packets sent from the server to the client.
Provided Methods§
Sourcefn read_packet(data: &mut Cursor<&[u8]>) -> Result<Self, PacketError>
fn read_packet(data: &mut Cursor<&[u8]>) -> Result<Self, PacketError>
Reads a packet from the given data.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".