pub fn fetch_group_order(message: &AnyControlMessage) -> GroupOrderExpand description
The Group Order a FETCH_OK named, for handing to
AnyConnection::accept_fetch.
§Why this is a function and not a field lookup at the call site
Because the field moved twice and the answer is silent when it is wrong.
Drafts 07 through 14 put Group Order on FETCH_OK outright. Drafts 15 and 16
deleted it from the message. Drafts 17 through 20 brought it back as
Track Property 0x22, DEFAULT PUBLISHER GROUP ORDER, which is
optional — so on the three drafts where the value decides how every Group ID
after the first is resolved, the commonest FETCH_OK does not carry it at all.
moqtap_codec::types::GroupOrder::Ascending is the answer in that case, and
it is the draft’s answer rather than this function’s: draft-20 Section 10.2.8
makes Ascending the default for an omitted property.
A message that is not a FETCH_OK answers Ascending too, and that is not a
claim about it — nothing else here has a Group Order to report, and a caller
holding the wrong message has a different problem than this can name.
Written against moqtap_codec::dispatch::AnyControlMessage::fields rather
than as an arm per draft, so a draft that moves the field again is one entry
here rather than a match that still compiles.