pub struct SubgroupStreamType(u8);Expand description
Subgroup stream type byte (§10.4.2, Table 7).
The 12 defined types encode four independent boolean fields in the low nibble:
- bit 0 (
0x01) — Extensions Present - bit 1 (
0x02) — Subgroup ID derives from first Object ID (only meaningful when bit 2 is clear) - bit 2 (
0x04) — Subgroup ID Field Present (explicit Subgroup ID varint) - bit 3 (
0x08) — Contains End of Group
Tuple Fields§
§0: u8Implementations§
Source§impl SubgroupStreamType
impl SubgroupStreamType
Sourcepub fn from_u8(v: u8) -> Option<Self>
pub fn from_u8(v: u8) -> Option<Self>
Create a SubgroupStreamType from its raw byte, validating
that it is one of the 12 defined values in Table 7.
Sourcepub fn from_flags(
subgroup_id_field_present: bool,
subgroup_id_is_first_object: bool,
extensions_present: bool,
end_of_group: bool,
) -> Self
pub fn from_flags( subgroup_id_field_present: bool, subgroup_id_is_first_object: bool, extensions_present: bool, end_of_group: bool, ) -> Self
Build a subgroup stream type from its component flags.
subgroup_id_is_first_object and subgroup_id_field_present are
mutually exclusive — if both are set, the resulting type has the
“Subgroup ID Field Present” bit set (bit 2 wins).
Sourcepub fn has_subgroup_id_field(self) -> bool
pub fn has_subgroup_id_field(self) -> bool
True if the header carries an explicit Subgroup ID varint.
Sourcepub fn subgroup_id_is_first_object(self) -> bool
pub fn subgroup_id_is_first_object(self) -> bool
True if the subgroup ID is defined to equal the first Object ID
in the stream (applies only when Self::has_subgroup_id_field
is false).
Sourcepub fn extensions_present(self) -> bool
pub fn extensions_present(self) -> bool
True if every object in the stream carries extension headers.
Sourcepub fn contains_end_of_group(self) -> bool
pub fn contains_end_of_group(self) -> bool
True if the last object on the stream (prior to FIN) is the end of its group.
Trait Implementations§
Source§impl Clone for SubgroupStreamType
impl Clone for SubgroupStreamType
Source§fn clone(&self) -> SubgroupStreamType
fn clone(&self) -> SubgroupStreamType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more