pub enum DraftVersion {
Draft07,
Draft08,
Draft09,
Draft10,
Draft11,
Draft12,
Draft13,
Draft14,
Draft15,
Draft16,
Draft17,
Draft18,
}Expand description
MoQT draft version for runtime codec selection.
Variants§
Draft07
draft-ietf-moq-transport-07.
Draft08
draft-ietf-moq-transport-08.
Draft09
draft-ietf-moq-transport-09.
Draft10
draft-ietf-moq-transport-10.
Draft11
draft-ietf-moq-transport-11.
Draft12
draft-ietf-moq-transport-12.
Draft13
draft-ietf-moq-transport-13.
Draft14
draft-ietf-moq-transport-14.
Draft15
draft-ietf-moq-transport-15.
Draft16
draft-ietf-moq-transport-16.
Draft17
draft-ietf-moq-transport-17.
Draft18
draft-ietf-moq-transport-18.
Implementations§
Source§impl DraftVersion
impl DraftVersion
Sourcepub fn version_varint(&self) -> VarInt
pub fn version_varint(&self) -> VarInt
The MoQT version number announced in CLIENT_SETUP.
Format: 0xff000000 + draft_number. Draft-15+ use ALPN for version
negotiation and may not include a version in CLIENT_SETUP at all.
Sourcepub fn quic_alpn(&self) -> &'static [u8] ⓘ
pub fn quic_alpn(&self) -> &'static [u8] ⓘ
The ALPN protocol identifier for raw QUIC connections.
Drafts 07–14 all use moq-00 and negotiate the draft version in
CLIENT_SETUP / SERVER_SETUP. Draft-15+ encode the draft number in the
ALPN itself (moqt-<N>), per §3.1.2 of each spec.
Sourcepub fn from_alpn(alpn: &[u8]) -> Option<DraftVersion>
pub fn from_alpn(alpn: &[u8]) -> Option<DraftVersion>
Resolve an ALPN identifier to a specific draft version.
Returns Some for ALPNs that unambiguously identify a draft
(moqt-15, moqt-16, moqt-17, moqt-18). Returns None for
moq-00 — which covers drafts 07–14 and requires inspecting
CLIENT_SETUP’s supported-versions list — and for any unrecognized
ALPN.
Sourcepub fn from_number(n: u8) -> Option<DraftVersion>
pub fn from_number(n: u8) -> Option<DraftVersion>
Resolve a draft number (e.g. 7..=18) to a DraftVersion.
Returns None for numbers outside the supported range.
Sourcepub fn uses_fixed_length_framing(&self) -> bool
pub fn uses_fixed_length_framing(&self) -> bool
Whether this draft uses a 16-bit big-endian message length in control
message framing (true) or a QUIC varint (false).
Draft-11 changed the framing from Length(i) to Length(16).
Trait Implementations§
Source§impl Clone for DraftVersion
impl Clone for DraftVersion
Source§fn clone(&self) -> DraftVersion
fn clone(&self) -> DraftVersion
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DraftVersion
impl Debug for DraftVersion
Source§impl Display for DraftVersion
impl Display for DraftVersion
Source§impl Hash for DraftVersion
impl Hash for DraftVersion
Source§impl PartialEq for DraftVersion
impl PartialEq for DraftVersion
Source§fn eq(&self, other: &DraftVersion) -> bool
fn eq(&self, other: &DraftVersion) -> bool
self and other values to be equal, and is used by ==.