pub struct SubgroupHeader {
pub stream_type: StreamType,
pub track_alias: VarInt,
pub group_id: VarInt,
pub subgroup_id: VarInt,
pub publisher_priority: u8,
}Expand description
Subgroup stream header (unified across all 6 stream type variants).
Decoded representation includes stream_type to preserve the variant.
Fields§
§stream_type: StreamTypeThe stream type variant used for encoding.
track_alias: VarIntTrack alias identifying the subscription.
group_id: VarIntGroup identifier.
subgroup_id: VarIntSubgroup identifier within the group.
publisher_priority: u8Publisher priority for delivery ordering.
Implementations§
Source§impl SubgroupHeader
impl SubgroupHeader
Sourcepub fn encode(&self, buf: &mut impl BufMut)
pub fn encode(&self, buf: &mut impl BufMut)
Encode the subgroup header (always as explicit subgroup_id format).
Sourcepub fn decode(buf: &mut impl Buf) -> Result<Self, CodecError>
pub fn decode(buf: &mut impl Buf) -> Result<Self, CodecError>
Decode a subgroup header (assumes explicit subgroup_id format).
For stream-type-aware decoding, use Self::decode_with_type.
Sourcepub fn decode_with_type(
stream_type: StreamType,
buf: &mut impl Buf,
) -> Result<Self, CodecError>
pub fn decode_with_type( stream_type: StreamType, buf: &mut impl Buf, ) -> Result<Self, CodecError>
Decode a subgroup header with the specific stream type variant.
Trait Implementations§
Source§impl Clone for SubgroupHeader
impl Clone for SubgroupHeader
Source§fn clone(&self) -> SubgroupHeader
fn clone(&self) -> SubgroupHeader
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SubgroupHeader
impl Debug for SubgroupHeader
Source§impl PartialEq for SubgroupHeader
impl PartialEq for SubgroupHeader
impl Eq for SubgroupHeader
impl StructuralPartialEq for SubgroupHeader
Auto Trait Implementations§
impl Freeze for SubgroupHeader
impl RefUnwindSafe for SubgroupHeader
impl Send for SubgroupHeader
impl Sync for SubgroupHeader
impl Unpin for SubgroupHeader
impl UnsafeUnpin for SubgroupHeader
impl UnwindSafe for SubgroupHeader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more