pub trait PacketFactory {
type Packet: PacketCodec + PacketValidation + CompressionControl + EncryptionControl;
// Required methods
fn create_packet(&self, id: i32) -> Self::Packet;
fn create_from_bytes(&self, bytes: BytesMut) -> Result<Self::Packet>;
}Required Associated Types§
Sourcetype Packet: PacketCodec + PacketValidation + CompressionControl + EncryptionControl
type Packet: PacketCodec + PacketValidation + CompressionControl + EncryptionControl
The packet type this factory creates