macro_rules! modern_subgroup_glue {
(derived_length $name:ident, $feat:literal, $draft:ident) => { ... };
(explicit_length $name:ident, $feat:literal, $draft:ident) => { ... };
}Expand description
Generates the conversion glue between one draft’s stateful
SubgroupObjectReader and the draft-neutral object types.
Every draft from 14 on carries a typed ObjectStatus, so the leading
keyword selects how the payload length reaches the wire instead: draft-14
derives it from the payload, while drafts 15-20 carry an explicit
payload-length field, which this glue always sets from the payload.
Both arms funnel the draft-neutral AnySubgroupObject, whose status is a
bare u64, through the target draft’s ObjectStatus::from_u64. That is
the one place a status code the target draft does not assign can still be
offered to an encoder at run time — relaying an object between drafts, for
instance — and it is refused there with CodecError::InvalidField.