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-specificConnection.AnyClientEvent— wraps a draft-specificClientEvent.AnyConnectionObserver— a trait that receivesAnyClientEvents. Attached to anAnyConnectionviaAnyConnection::set_observer, which installs a per-draft adapter on the inner connection.AnyRequest— what a request made throughAnyConnectionleaves 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 that has the message
(subscribe, fetch, track_status, subscribe_namespace,
publish_namespace, publish, subscribe_tracks). The rest differ too
much in signature — match on the variant to reach them.
Re-exports§
use std::sync::Arc;🔒use moqtap_codec::kvp::KeyValuePair;🔒use moqtap_codec::version::DraftVersion;🔒
Modules§
- Draft07 🔒
- Draft08 🔒
- Draft09 🔒
- Draft10 🔒
- Draft11 🔒
- Draft12 🔒
- Draft13 🔒
- Draft14 🔒
- Draft15 🔒
- Draft16 🔒
- Draft17 🔒
- Draft18 🔒
- Draft19 🔒
- Draft20 🔒
- Draft21 🔒
- Draft22 🔒
- Draft23 🔒
Macros§
- data_
stream_ 🔒dispatch - Expands one body per group of drafts that share a shape, over
AnySubgroupWriter,AnySubgroupReaderorAnyFetchReader. - dispatch_
all 🔒 - Generates the
AnyConnectionandAnyClientEventenums plus the per-draft observer adapter, with one variant per enabled draft feature.
Structs§
- AnyClient
Config - Draft-agnostic client configuration. The exact per-draft
ClientConfigis constructed internally byAnyConnection::connectbased ondraft. - AnyConnection
Error - Error returned by
AnyConnection::connect,AnyConnection::recv_responseand the rest of this facade. - AnyFetch
Object - One object on a fetch stream, in the terms every draft shares.
- AnyObject
- One object on a subgroup stream, in the terms every draft shares.
- Control
Frame - One control message as it crossed the wire, lifted out of whichever draft’s event carried it.
- Draft16
Fetch Stream - Draft-16’s fetch stream, carried with the resolver its objects need.
- Fetch
Range - The range one
AnyConnection::fetchasks for. - NoOp
Observer - A no-op observer that discards all events.
- Subscribe
Range - The range one
AnyConnection::subscribe_rangeasks for.
Enums§
- AnyArrival
- What arrived from the peer, and whether this facade has a handle for it.
- AnyClient
Event - An event from a MoQT connection of any enabled draft version.
- AnyConnection
- A MoQT client connection of any enabled draft version.
- AnyFetch
Reader - A fetch stream the peer opened, that this endpoint is reading.
- AnyInbound
Request - A request the peer made, and the handle this side answers it through.
- AnyRequest
- A request made through
AnyConnection, in whichever form the negotiated draft carries it. - AnySubgroup
Reader - A subgroup stream the peer opened, that this endpoint is reading.
- AnySubgroup
Writer - A subgroup stream this endpoint opened and is writing objects to.
- AnyTransport
Type - Draft-agnostic transport choice for
AnyConnection::connect. - Error
Cause - Why a call through this facade stopped, kept as a value rather than as words.
- Fetch
End - Where a FETCH’s range ends, said once in a way no draft can read two ways.
- Joining
Start - Where a Joining FETCH starts, said once for the two forms the drafts give it.
- Subscribe
End - Where a subscription’s range stops, said once in a way no draft can read two ways.
Traits§
- AnyConnection
Observer - Trait for receiving events from an
AnyConnection.
Functions§
- fetch_
group_ order - The Group Order a FETCH_OK named, for handing to
AnyConnection::accept_fetch. - forward_
parameter 🔒 forwardas the FORWARD parameter, key 0x10, which is where drafts 15 through 22 carry the field drafts 12 through 14 write inline in a PUBLISH. The codec owns the value’s encoding on each draft, so this hands it over as a plain varint.