Skip to main content

Module data_dispatch

Module data_dispatch 

Source
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§

AnyFetchFrame
One fetch frame, in the form re-encoding it takes.
AnyFetchObject
One frame read from a fetch data stream, normalised across drafts.
AnyFetchObjectMeta
The framing of one fetch frame, without its payload.
AnyFetchObjectReader
Stateful reader for the frames on a fetch data stream, for any enabled draft.
AnyFetchObjectWriter
Re-emitter for the frames of a fetch data stream, for any enabled draft.
AnySubgroupObject
One object read from a subgroup data stream, normalised across drafts.
AnySubgroupObjectMeta
The framing of one subgroup object, without its payload.
AnySubgroupObjectReader
Stateful reader for the objects on a subgroup data stream, for any enabled draft.
AnySubgroupObjectWriter
Serializer for the objects on a subgroup data stream, for any enabled draft.

Enums§

AnyFetchEndOfRange
What an End of Range indicator asserts about the Locations it covers.
AnyFetchGroupOrder
The order a fetch response’s groups arrive in.
FetchReemit
What AnyFetchObjectWriter::reemit_object had to do.
Reemit
What reemit_subgroup_object had 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.