Skip to main content

Crate moqtap_codec

Crate moqtap_codec 

Source
Expand description

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

Each draft sits behind its own feature flag — draft07 through draft19. 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

§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 thirteen 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.

Modules§

auth_token
The Token structure carried by the AUTHORIZATION TOKEN parameter.
data_dispatch
Draft-neutral object framing for data streams.
dispatch
Unified types and version-aware decode/encode across drafts.
draft07
MoQT wire codec for draft-07. MoQT wire codec for draft-07.
draft08
MoQT wire codec for draft-08. MoQT wire codec for draft-08.
draft09
MoQT wire codec for draft-09. MoQT wire codec for draft-09.
draft10
MoQT wire codec for draft-10. MoQT wire codec for draft-10.
draft11
MoQT wire codec for draft-11. MoQT wire codec for draft-11.
draft12
MoQT wire codec for draft-12. MoQT wire codec for draft-12.
draft13
MoQT wire codec for draft-13. MoQT wire codec for draft-13.
draft14
MoQT wire codec for draft-14. MoQT wire codec for draft-14.
draft15
MoQT wire codec for draft-15. MoQT wire codec for draft-15.
draft16
MoQT wire codec for draft-16. MoQT wire codec for draft-16.
draft17
MoQT wire codec for draft-17. MoQT wire codec for draft-17.
draft18
MoQT wire codec for draft-18. MoQT wire codec for draft-18.
draft19
MoQT wire codec for draft-19 (latest). MoQT wire codec for draft-19.
error
Codec error types and size limits.
kvp
Key-value parameter pair encoding and decoding.
range_filter
The Range Filters draft-19 carries in parameter types 0x25 through 0x29.
subscription_filter
The subscription filter carried by the SUBSCRIPTION_FILTER parameter, named LOCATION_FILTER from draft-19.
types
Core protocol types shared across drafts.
varint
QUIC variable-length integer encoding and decoding.
version
MoQT draft version enum for runtime dispatch. MoQT draft version enum for runtime dispatch.