Skip to main content

Crate moqtap_codec

Crate moqtap_codec 

Source
Expand description

MoQT wire codec for draft-07 through draft-20.

Each draft sits behind its own feature flag — draft07 through draft20. The default is all-drafts, which enables every one of them.

§Shared modules

  • varint — variable-length integers, in whichever encoding the draft uses: RFC 9000 Section 16 through draft-16, MoQT’s own from draft-17
  • kvp — Key-value parameter pairs used in control messages
  • types — Core protocol types (TrackNamespace, Location, enums)
  • version — Draft version enum, ALPN and varint encoding per draft
  • error — Codec error types and size limits
  • auth_token, subscription_filter, range_filter — parameter values that carry a structure rather than opaque bytes
  • dispatch, data_dispatch — runtime draft dispatch and draft-neutral object framing
  • message_names — the name a draft gives a control message type ID, which needs both halves because the ids are reused across the range

§Draft-specific modules

Each draftNN module provides control message and data stream encoding/decoding for that specific draft version. Enable via the corresponding feature flag.

Each also carries an error_codes module holding that draft’s error, status and termination code registries as enums. They are reached only through their draft — draft14::error_codes::SessionErrorCode — and nothing from them is re-exported at the crate root. Registry names recur across drafts while the code points behind them move: every one of the fourteen defines a SessionErrorCode, and drafts that share a spelling do not always share a value. A root-level re-export would collide outright, and disambiguating it would mean coining names that appear in no draft’s table. The draftNN path is what fixes which table a code point came from.

Re-exports§

pub use message_names::message_type_name;

Modules§

auth_token
The Token structure carried by the AUTHORIZATION TOKEN parameter.
data_dispatch
Draft-neutral object framing for MoQT data streams.
dispatch
Unified types and version-aware decode/encode for runtime draft dispatch.
draft07
MoQT wire codec for draft-07.
draft08
MoQT wire codec for draft-08.
draft09
MoQT wire codec for draft-09.
draft10
MoQT wire codec for draft-10.
draft11
MoQT wire codec for draft-11.
draft12
MoQT wire codec for draft-12.
draft13
MoQT wire codec for draft-13.
draft14
MoQT wire codec for draft-14.
draft15
MoQT wire codec for draft-15.
draft16
MoQT wire codec for draft-16.
draft17
MoQT wire codec for draft-17.
draft18
MoQT wire codec for draft-18.
draft19
MoQT wire codec for draft-19.
draft20
MoQT wire codec for draft-20.
error
Codec error types and size limits.
fields
A decoded control message as a tree of named fields.
kvp
Key-value parameter pair encoding and decoding.
message_names
The name a draft gives a control message type ID.
range_filter
The Range Filters drafts 19 and 20 carry in five parameters.
subscription_filter
The subscription filter drafts 15 through 19 carry inside a parameter.
types
Core protocol types shared across drafts.
varint
QUIC variable-length integer encoding and decoding.
version
MoQT draft version enum for runtime dispatch.