#[repr(u64)]pub enum StreamType {
Datagram = 0,
DatagramExt = 1,
DatagramStatus = 2,
DatagramStatusExt = 3,
Fetch = 5,
SubgroupZero = 8,
SubgroupZeroExt = 9,
SubgroupFirstObj = 10,
SubgroupFirstObjExt = 11,
SubgroupExplicit = 12,
SubgroupExplicitExt = 13,
}Expand description
Stream type IDs for draft-11 data streams.
Variants§
Datagram = 0
Object datagram, no extensions (0x00).
DatagramExt = 1
Object datagram, with extensions (0x01).
DatagramStatus = 2
Object datagram status, no extensions (0x02).
DatagramStatusExt = 3
Object datagram status, with extensions (0x03).
Fetch = 5
Fetch response stream (0x05).
SubgroupZero = 8
Subgroup: subgroup_id=0, no extensions (0x08).
SubgroupZeroExt = 9
Subgroup: subgroup_id=0, with extensions (0x09).
SubgroupFirstObj = 10
Subgroup: subgroup_id=first object ID, no extensions (0x0A).
SubgroupFirstObjExt = 11
Subgroup: subgroup_id=first object ID, with extensions (0x0B).
SubgroupExplicit = 12
Subgroup: explicit subgroup_id, no extensions (0x0C).
SubgroupExplicitExt = 13
Subgroup: explicit subgroup_id, with extensions (0x0D).
Implementations§
Source§impl StreamType
impl StreamType
Sourcepub fn from_id(id: u64) -> Option<Self>
pub fn from_id(id: u64) -> Option<Self>
Convert a raw stream type ID to a StreamType, if valid.
Sourcepub fn is_subgroup(&self) -> bool
pub fn is_subgroup(&self) -> bool
Whether this stream type is a subgroup variant.
Sourcepub fn has_extensions(&self) -> bool
pub fn has_extensions(&self) -> bool
Whether this stream type includes extension headers on objects.
Sourcepub fn writes_subgroup_id(&self) -> bool
pub fn writes_subgroup_id(&self) -> bool
True if this subgroup stream type puts an explicit Subgroup ID on the wire.
The Subgroup ID Field Present column of the SUBGROUP_HEADER type table in Section 9.4.2. The other two columns of that row say what the Subgroup ID is where the field is absent — zero, or the first Object’s ID — so this is only about the field, never about the value.
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