Skip to main content

encode_with_order

Function encode_with_order 

Source
pub fn encode_with_order(msg: &Message, field_order: Option<&[u32]>) -> Vec<u8> 
Expand description

As encode, but when field_order is Some, the message body’s top-level fields are emitted in that tag order instead of insertion order (US9, feature 005, FR-027) — fields present in field_order come first (in that order), then any body field not listed in it (e.g. a UDF), in its original insertion-relative order, matching QFJ’s own FieldOrderComparator “unspecified fields last” semantics. Repeating-group entries are unaffected (each entry’s own field order is unconditionally preserved) — field_order only reorders the message body’s direct top-level members.