#[repr(u64)]pub enum StreamType {
Datagram = 1,
DatagramStatus = 2,
Subgroup = 4,
Fetch = 5,
}Expand description
Every type ID this draft’s data plane assigns, from two separate tables.
The draft keeps unidirectional stream types and datagram types in different tables and different number spaces: SUBGROUP_HEADER and FETCH_HEADER name unidirectional streams, OBJECT_DATAGRAM and OBJECT_DATAGRAM_STATUS name datagrams. The numbers happen not to collide on this draft, which is what lets one enum hold all four.
StreamType::from_id therefore answers across both tables and cannot say
which one a value came from, which makes it the wrong question to ask about
a stream or a datagram in hand. stream_type_error and
datagram_type_error ask it per table, and the difference is not
cosmetic: a value assigned in the other table is unknown in this one, and
this draft answers an unknown type by ending the session.
Variants§
Datagram = 1
Datagram with payload (0x01).
DatagramStatus = 2
Datagram with status only, no payload (0x02).
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