pub fn encode_packet_data( packet_id: i32, encode_fn: impl FnOnce(&mut Vec<u8>), ) -> Vec<u8> ⓘ
Encode a typed packet into raw bytes (packet ID + fields), without framing.