fn decoded_status(code: u64) -> Result<ObjectStatus, CodecError>Expand description
Turn a wire Object Status code into the status draft-16 gives it, refusing any code the draft does not assign.
Draft-16 Section 10.2.1.1 lists the codes an object may carry and says any other value SHOULD be treated as a protocol error and the session closed with a PROTOCOL_VIOLATION. Every place this module reads a status runs the wire code through here. Draft-16 is where the set narrowed to three: 0x1, which drafts 07-15 assign to Object Does Not Exist, is refused here.
SubgroupObject::object_status and DatagramHeader::object_status
then store the ObjectStatus this returns rather than the raw code, so
the refusal is not something a future decode site can forget: those fields
cannot hold an unassigned value at all, in either direction, and the encode
paths need no check of their own.
SubgroupObjectMeta::status deliberately keeps the raw code — it is a
decode-only view that never feeds an encoder — but it is filtered through
here too, so the two readers agree byte for byte on what parses.