pub fn deserialize_packet<P: ProtocolPacket + Debug>( stream: &mut Cursor<&[u8]>, ) -> Result<P, Box<ReadPacketError>>