pub struct AnySubgroupObject {
pub object_id: u64,
pub extension_headers: Vec<u8>,
pub extension_count: Option<u64>,
pub status: Option<u64>,
pub payload: Vec<u8>,
}Expand description
One object read from a subgroup data stream, normalised across drafts.
Field semantics are identical on every draft 07-23; the per-draft wire
differences (absolute vs delta object IDs, count- vs length-prefixed
extension blocks, typed vs raw status codes) are resolved by
AnySubgroupObjectReader before this value is produced.
Fields§
§object_id: u64Absolute Object ID. Already resolved from delta encoding on drafts 14-23; copied verbatim on drafts 07-13.
extension_headers: Vec<u8>The extension-header (draft-17+: “property”) block’s contents, excluding any length or count prefix. Empty when the draft has no extension block, when the enclosing header’s extensions bit is clear, or when the block is present but zero-length.
crate::object_properties::parse_object_properties reads it as a
list. A verbatim copy of the wire bytes on every draft except draft-08.
Draft-08’s block is count-prefixed with no byte length, so its contents
can only be delimited by parsing each extension; the blob is therefore
re-serialized from that parsed form, which re-encodes every varint
minimally. A draft-08 extension whose value arrived as a legal
non-minimal varint is semantically but not byte-identically preserved.
extension_count: Option<u64>Number of extensions in extension_headers. Some only on draft-08,
whose extension block is count-prefixed rather than
byte-length-prefixed, so the count cannot be recovered from the blob
without re-parsing it. None on every other draft.
status: Option<u64>Object Status as the raw wire code, present only when the payload
length is zero. None means a non-empty payload followed and the
status is implicitly Normal.
Kept as a raw code rather than a typed enum because the assigned set changes across drafts and this value crosses drafts — a relay reads a status on one and writes it on another, where the same number may mean something else or nothing at all. The code is nonetheless always one the source draft assigns: every draft’s decoder refuses an unassigned status, so this field never carries a value its draft’s Object Status section forbids.
payload: Vec<u8>Object payload. Empty when status is Some.