Skip to main content

subgroup_id_mode_must_be_consulted

Function subgroup_id_mode_must_be_consulted 

Source
const fn subgroup_id_mode_must_be_consulted(draft: DraftVersion) -> bool
Expand description

Whether a header’s reserved subgroup-ID mode has to be told apart from mode 1 before an object behind it can be judged. Drafts 15-21.

Not the drafts that name a SUBGROUP_ID_MODE field, which is neither a superset nor a subset of this. Drafts 16 through 20 name one — draft-16: “Type values with SUBGROUP_ID_MODE set to 0b11: 0x16, 0x17, 0x1E, 0x1F, 0x36, 0x37, 0x3E, 0x3F. This mode is reserved for future use.” Draft-15 names nothing and states the same three carriers as table columns, then leaves the fourth combination out of the table. The wording is what differs; the two bits and their four values are not.

What decides it is where AnySubgroupHeader::subgroup_id answers None for more than one reason. On these six it answers None for both mode 1 and the fourth combination, so None alone cannot say whether the first object defines the subgroup or the header is one no receiver should read, and the mode has to be consulted. Drafts 11 through 14 give each carrier a stream type of its own and assign every type they define, so their None means the first object and nothing else; drafts 07-10 always put the ID on the wire and never answer None at all.

Draft-15 and draft-16 are in the set on that reading alone. Draft-15 names no mode field and draft-16 names one, so the field is not what puts either of them here; a None that could mean either reading is.

Exhaustive rather than a matches!, because the question this asks is not one a new draft can be assumed out of: the sentence above is about what AnySubgroupHeader::subgroup_id answers None for on that draft, and only reading the draft settles it.