Skip to main content

Module dispatch

Module dispatch 

Source
Expand description

Unified multi-draft entry-point types.

This module is the facade downstream consumers use to hold a MoQT connection without caring which draft was negotiated. It mirrors moqtap_codec::dispatch: one enum variant per enabled draft, gated on its feature flag.

Four types live here:

  • AnyConnection — wraps a draft-specific Connection.
  • AnyClientEvent — wraps a draft-specific ClientEvent.
  • AnyConnectionObserver — a trait that receives AnyClientEvents. Attached to an AnyConnection via AnyConnection::set_observer, which installs a per-draft adapter on the inner connection.
  • AnyRequest — what a request made through AnyConnection leaves the caller holding. Drafts 07-16 put every request on the one control stream and hand back only a request ID; from draft-17 on each request owns a bidirectional stream, and the handle owns that stream.

AnyConnection carries only the handful of protocol methods whose arguments can be reconciled across every draft (subscribe, fetch, track_status, subscribe_namespace). The rest differ too much in signature — match on the variant to reach them.

Modules§

Draft07 🔒
Draft08 🔒
Draft09 🔒
Draft10 🔒
Draft11 🔒
Draft12 🔒
Draft13 🔒
Draft14 🔒
Draft15 🔒
Draft16 🔒
Draft17 🔒
Draft18 🔒
Draft19 🔒
Draft20 🔒

Macros§

dispatch_all 🔒
Generates the AnyConnection and AnyClientEvent enums plus the per-draft observer adapter, with one variant per enabled draft feature.

Structs§

AnyClientConfig
Draft-agnostic client configuration. The exact per-draft ClientConfig is constructed internally by AnyConnection::connect based on draft.
AnyConnectionError
Error returned by AnyConnection::connect and AnyConnection::recv_and_dispatch. Draft-specific errors are flattened to strings so callers don’t have to branch on draft to inspect errors.
FetchRange
The range one AnyConnection::fetch asks for.
NoOpObserver
A no-op observer that discards all events.

Enums§

AnyClientEvent
An event from a MoQT connection of any enabled draft version.
AnyConnection
A MoQT client connection of any enabled draft version.
AnyRequest
A request made through AnyConnection, in whichever form the negotiated draft carries it.
AnyTransportType
Draft-agnostic transport choice for AnyConnection::connect.
FetchEnd
Where a FETCH’s range ends, said once in a way no draft can read two ways.

Traits§

AnyConnectionObserver
Trait for receiving events from an AnyConnection.