fn read_group_order_response(
buf: &mut impl Buf,
) -> Result<GroupOrder, CodecError>Expand description
Read a Group Order from a message that must name a real order.
Draft-14 states it for four messages, in the same words each time: “Values of 0x0 and those larger than 0x2 are a protocol error” — SUBSCRIBE_OK in Section 9.8, PUBLISH in Section 9.13, PUBLISH_OK in Section 9.14 and FETCH_OK in Section 9.17. TRACK_STATUS_OK takes the same reader without stating the sentence itself, because Section 9.21 says its “message format is identical to the SUBSCRIBE_OK message” and that a publisher “populates the fields of TRACK_STATUS_OK exactly as it would have populated a SUBSCRIBE_OK”.
SUBSCRIBE, FETCH and TRACK_STATUS are the requests and keep the ordinary reader: there 0x0 is exactly how a subscriber says it has no preference — “A value of 0x0 indicates the original publisher’s Group Order SHOULD be used” — and only values above 0x2 are called an error. The two readers cannot be merged without either refusing traffic the requests permit or accepting a reply that tells the subscriber nothing.