pub fn serialize_packet<P: ProtocolPacket + Debug>( packet: &P, ) -> Result<Vec<u8>, PacketEncodeError>