pub enum AnyFetchHeader {
Show 13 variants
Draft07(FetchHeader),
Draft08(FetchHeader),
Draft09(FetchHeader),
Draft10(FetchHeader),
Draft11(FetchHeader),
Draft12(FetchHeader),
Draft13(FetchHeader),
Draft14(FetchHeader),
Draft15(FetchHeader),
Draft16(FetchHeader),
Draft17(FetchHeader),
Draft18(FetchHeader),
Draft19(FetchHeader),
}Expand description
A fetch header from any enabled draft.
Note: Header structure varies significantly across drafts. Draft-07 has a minimal fetch header, Draft-14 has a full header.
Variants§
Draft07(FetchHeader)
Draft-draft07 variant.
Draft08(FetchHeader)
Draft-draft08 variant.
Draft09(FetchHeader)
Draft-draft09 variant.
Draft10(FetchHeader)
Draft-draft10 variant.
Draft11(FetchHeader)
Draft-draft11 variant.
Draft12(FetchHeader)
Draft-draft12 variant.
Draft13(FetchHeader)
Draft-draft13 variant.
Draft14(FetchHeader)
Draft-draft14 variant.
Draft15(FetchHeader)
Draft-draft15 variant.
Draft16(FetchHeader)
Draft-draft16 variant.
Draft17(FetchHeader)
Draft-draft17 variant.
Draft18(FetchHeader)
Draft-draft18 variant.
Draft19(FetchHeader)
Draft-draft19 variant.
Implementations§
Source§impl AnyFetchHeader
impl AnyFetchHeader
Sourcepub fn decode(
version: DraftVersion,
buf: &mut impl Buf,
) -> Result<Self, CodecError>
pub fn decode( version: DraftVersion, buf: &mut impl Buf, ) -> Result<Self, CodecError>
Decode from wire using the specified draft version.
Sourcepub fn encode(&self, buf: &mut impl BufMut)
pub fn encode(&self, buf: &mut impl BufMut)
Encode to wire using the appropriate draft’s format.
Sourcepub fn draft(&self) -> DraftVersion
pub fn draft(&self) -> DraftVersion
Returns the draft version this value belongs to.
Source§impl AnyFetchHeader
impl AnyFetchHeader
Sourcepub fn request_id(&self) -> u64
pub fn request_id(&self) -> u64
The id of the request this fetch stream answers.
Every draft puts it in the header and nothing else: drafts 07-10 call it the Subscribe ID and drafts 11-19 the Request ID, and it names the request the publisher is responding to either way. Draft-19 Section 11.4.4: “When a stream begins with FETCH_HEADER, all objects on the stream belong to the track requested in the Fetch message identified by Request ID.”
It is what ties a fetch data stream back to the control exchange that opened it, which is the only route by which anything the stream does not state — on drafts 18 and 19, the Group Order its Group ID Deltas resolve against — can reach a reader.
Sourcepub fn encode_stream(&self, buf: &mut impl BufMut)
pub fn encode_stream(&self, buf: &mut impl BufMut)
As AnySubgroupHeader::encode_stream, for fetch streams.
Fetch was the carrier this pair was missing: decode_stream has
existed here all along with nothing on the other side of it, so a
fetch stream the codec wrote could not be read back by the codec.
Sourcepub fn decode_stream(
version: DraftVersion,
buf: &mut impl Buf,
) -> Result<Self, CodecError>
pub fn decode_stream( version: DraftVersion, buf: &mut impl Buf, ) -> Result<Self, CodecError>
As AnySubgroupHeader::decode_stream, for fetch streams.
Trait Implementations§
Source§impl Clone for AnyFetchHeader
impl Clone for AnyFetchHeader
Source§fn clone(&self) -> AnyFetchHeader
fn clone(&self) -> AnyFetchHeader
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more