Skip to main content

decoded_status

Function decoded_status 

Source
fn decoded_status(code: u64) -> Result<ObjectStatus, CodecError>
Expand description

Turn a wire Object Status code into an ObjectStatus, refusing one draft-18 does not assign.

Draft-18 Section 11.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 converts it here, so a decoded SubgroupObject::object_status or DatagramHeader::object_status is always a status the draft assigns, and SubgroupObjectMeta::status — which stays a raw code because a relay may carry it to a draft that numbers the set differently — holds one because it comes from the same conversion.