pub const fn starts_a_request_stream(ty: MessageType) -> boolExpand description
Whether ty is one of the seven message types draft-18 Section 3.3 lets a
bidirectional stream begin with.
The match is exhaustive over MessageType and deliberately has no
wildcard arm. That is the drift guard: MessageType is not
#[non_exhaustive], so the day a draft gains a message type this stops
compiling until someone says here whether the new type opens a request
stream. A wildcard would silently answer “no” for it — which is exactly
what would have happened to SUBSCRIBE_TRACKS, the type draft-18 added.
Classification is over the typed MessageType, never over a raw u64,
because the number alone does not say which registry it came from: on
draft-18, 0x50 is SUBSCRIBE_NAMESPACE as a control message type and also
the start of a SUBGROUP_HEADER range as a unidirectional stream type.