pub struct SubgroupHeader {
pub track_alias: VarInt,
pub group_id: VarInt,
pub subgroup_id: VarInt,
pub publisher_priority: u8,
}Expand description
Subgroup stream header (follows the stream type varint).
Fields§
§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_stream(&self, buf: &mut impl BufMut)
pub fn encode_stream(&self, buf: &mut impl BufMut)
Encode a subgroup stream header including its leading stream-type field, so the bytes form the start of a data stream a peer can read.
Self::encode writes the body alone, which is what a caller wants
once the stream is already open and what a caller must not use for its
first write.
Sourcepub fn decode(buf: &mut impl Buf) -> Result<Self, CodecError>
pub fn decode(buf: &mut impl Buf) -> Result<Self, CodecError>
Decode a subgroup header from the buffer.
Sourcepub fn decode_stream(buf: &mut impl Buf) -> Result<Self, CodecError>
pub fn decode_stream(buf: &mut impl Buf) -> Result<Self, CodecError>
Decode a subgroup header from the start of a data stream, consuming the leading stream type varint.
Errors with CodecError::UnknownStreamType when the leading type is
not one this draft’s stream table assigns, and with
CodecError::InvalidField when it is the other assigned type — a
stream this reader cannot read, but not one the draft asks a session to
be closed over.
Trait Implementations§
Source§impl Clone for SubgroupHeader
impl Clone for SubgroupHeader
Source§fn clone(&self) -> SubgroupHeader
fn clone(&self) -> SubgroupHeader
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more