#[repr(u64)]pub enum StreamType {
Datagram = 1,
Subgroup = 4,
Fetch = 5,
}Expand description
Every type ID this draft’s data plane assigns, from the single table it keeps them in.
Draft-07 Section 7 numbers streams and datagrams together. Its Table 5 is headed “Stream Type” and holds all three assignments — 0x1 OBJECT_DATAGRAM, 0x4 STREAM_HEADER_SUBGROUP, 0x5 FETCH_HEADER — under one sentence: “All unidirectional MOQT streams, as well as all datagrams, start with a variable-length integer indicating the type of the stream in question.” Draft-08 is where the two split into tables of their own, after which the numbers are reused across them independently.
One shared space is what makes 0x1 an assigned value at the head of a unidirectional stream rather than an unknown one. Such a stream is still refused — a datagram type says nothing about how to read a stream — but it is refused as a stream this reader cannot read, not under the unknown-stream-type rule, which would end the session.
StreamType::from_id answers over that one table. Callers that need the
narrower question, which of these a particular reader will accept, ask
stream_type_error instead.
Variants§
Datagram = 1
Datagram stream type (0x01).
Subgroup = 4
Subgroup stream type (0x04).
Fetch = 5
Fetch stream type (0x05).
Implementations§
Trait Implementations§
Source§impl Clone for StreamType
impl Clone for StreamType
Source§fn clone(&self) -> StreamType
fn clone(&self) -> StreamType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more