moqtap_client/draft20/mod.rs
1//! MoQT client implementation for draft-20.
2//!
3//! Each draft lives in its own top-level module with a complete, independent
4//! implementation: connection, endpoint state machine, event types, observer
5//! trait, and per-flow state machines (subscribe, fetch, publish, namespace,
6//! track status). No code is shared across drafts — each draft carries its
7//! own copy because wire-level differences would make a shared layer leaky.
8//!
9//! Enable via the `draft20` feature.
10//!
11//! # What changed from draft-19, in the places a caller can feel it
12//!
13//! * **FETCH was rebuilt** (Section 10.13). The `Fetch Type` field, the
14//! Standalone and Joining Fetch structures and the whole joining mechanism
15//! are gone; the Track Namespace and Track Name are inline fields, and the
16//! range travels in the `LOCATION_FILTER` parameter. So
17//! [`Connection::fetch`](connection::Connection::fetch) takes a parameter
18//! list where draft-19's took four location varints, and
19//! `joining_fetch` / `absolute_joining_fetch` no longer exist. A fill fetch
20//! stream is what replaces them; see [`fill`].
21//! * **`FILL_PARAMETERS` (0x23) is new** (Section 10.2.15). Its presence on a
22//! SUBSCRIBE or a REQUEST_UPDATE asks the publisher to open a fill fetch
23//! stream — a unidirectional stream beginning with a FETCH_HEADER that
24//! carries the *subscription's* Request ID. [`fill::FillParameters`] builds
25//! the parameter and
26//! [`Endpoint::fill_requested`](endpoint::Endpoint::fill_requested) is what
27//! tells an arriving FETCH_HEADER apart from a fetch's.
28//! * **`PUBLISH_STATE_NOTIFY` (0x22) is new** (Section 10.10): a unilateral
29//! report from the publisher on a subscription's stream, answered with
30//! nothing and not counted against `MAX_REQUEST_UPDATES`. It arrives as
31//! [`ClientEvent::PublishStateNotify`](event::ClientEvent::PublishStateNotify).
32//! * **Ranges are inclusive at both ends** (Sections 5.1.2, 10.13, 10.14).
33//! Draft-19's fetch end was "the last Object, plus 1; or 0 to indicate the
34//! entire Group"; both conventions are deleted, and nothing in this module
35//! carries the arithmetic forward.
36//! * **`INCLUDE_PROPERTIES` (0x35) is new** (Section 10.2.21): a uint8 opt-out
37//! from Track Properties on the responding OK, default 1.
38//! * Three code points went: `SUBSCRIPTION_ENDED` (PUBLISH_DONE 0x3),
39//! `VERSION_NEGOTIATION_FAILED` (session 0x15) and
40//! `INVALID_JOINING_REQUEST_ID` (REQUEST_ERROR 0x32).
41//! * There is still **no version on the wire**. The negotiated draft is the
42//! ALPN, `moqt-20` on raw QUIC, exactly as on drafts 15 through 19.
43//!
44//! Section numbers shifted from 10.10 on, and `LOCATION_FILTER`'s neighbours
45//! shifted with them. Every citation in this module is draft-20's own.
46
47/// Outbound MoQT connection with MoQT framing over QUIC.
48pub mod connection;
49pub mod endpoint;
50pub mod event;
51/// Fetch lifecycle state machine.
52pub mod fetch;
53pub mod fill;
54/// Subscribe/Publish namespace state machines.
55pub mod namespace;
56pub mod observer;
57/// Publish lifecycle state machine.
58pub mod publish;
59pub mod session;
60/// Subscription lifecycle state machine.
61pub mod subscription;
62/// Track status lifecycle state machine.
63pub mod track_status;