Skip to main content

DOC_FLAGS_MASK

Constant DOC_FLAGS_MASK 

Source
pub const DOC_FLAGS_MASK: u8 = _; // 3u8
Expand description

Mask of currently-defined flag bits. Bits set outside this mask are reserved for future protocol versions; today’s encoder rejects them with MessageError::InvalidFlags so that legacy frames can’t enable not-yet-implemented behaviors. Round-2 of peat-lite#26 added this reservation contract.

Adding a new flag: extend the mask, add the const, AND wire the encode/decode handling for the new behavior. The reserved_flag_bits_are_rejected test will start failing for the new bit (since it’s no longer reserved), forcing the contributor to update tests, which is the integration prompt that the behavior wiring is also incomplete. There is no static-analysis forcing function, so the test loop is the canary.