Expand description
Draft-neutral object framing for data streams.
Readers and a writer that address the objects on a subgroup or fetch
stream without exposing per-draft types. Re-exported from dispatch.
Draft-neutral object framing for MoQT data streams.
AnySubgroupObjectReader,
AnySubgroupObjectWriter,
AnyFetchObjectReader and
AnyFetchObjectWriter
present one API over thirteen drafts’ object encodings. The values they
produce — AnySubgroupObject, AnySubgroupObjectMeta, AnyFetchObject,
AnyFetchObjectMeta — are plain structs of primitives, so a caller can
address objects without naming a draftNN type.
Objects on drafts 07-13 are standalone: absolute Object IDs, and (on drafts 11-13) an extension block whose presence is fixed by the stream type. Drafts 14-19 delta-encode Object IDs against the previous object on the stream. Both are constructed from the stream’s header and read one object at a time, so the difference stays inside this module.
Fetch streams split the same way, at a different draft. Through draft-14 a
fetch object spells out its Group ID, Subgroup ID, Object ID and Publisher
Priority on every object, so each one stands alone. Drafts 15-19 put a
Serialization Flags field first and let it leave any of those four off the
wire, meaning “the prior object’s” — and from draft-18 the two ID fields
that remain are differences rather than values. So a fetch object on those
drafts is only meaningful in stream order, and
AnyFetchObjectReader
carries the running state that resolves it. The
values it produces are absolute on every draft.
§Partial buffers
Reader state after an error is unspecified. A caller that may be handed an incomplete object clones the reader, decodes against the clone, and overwrites the real reader only once the decode succeeds.
Structs§
- AnyFetch
Frame - One fetch frame, in the form re-encoding it takes.
- AnyFetch
Object - One frame read from a fetch data stream, normalised across drafts.
- AnyFetch
Object Meta - The framing of one fetch frame, without its payload.
- AnyFetch
Object Reader - Stateful reader for the frames on a fetch data stream, for any enabled draft.
- AnyFetch
Object Writer - Re-emitter for the frames of a fetch data stream, for any enabled draft.
- AnySubgroup
Object - One object read from a subgroup data stream, normalised across drafts.
- AnySubgroup
Object Meta - The framing of one subgroup object, without its payload.
- AnySubgroup
Object Reader - Stateful reader for the objects on a subgroup data stream, for any enabled draft.
- AnySubgroup
Object Writer - Serializer for the objects on a subgroup data stream, for any enabled draft.
Enums§
- AnyFetch
EndOf Range - What an End of Range indicator asserts about the Locations it covers.
- AnyFetch
Group Order - The order a fetch response’s groups arrive in.
- Fetch
Reemit - What
AnyFetchObjectWriter::reemit_objecthad to do. - Reemit
- What
reemit_subgroup_objecthad to do.
Functions§
- reemit_
subgroup_ object - Re-emit a subgroup object whose wire bytes are already known, adjusting only this draft’s encoding of its identity.