pub struct FetchHeader {
pub request_id: VarInt,
}Expand description
The head of a fetch stream: the stream type 0x05 and a Request ID.
Byte-identical to draft-19. What draft-20 widened is what the Request ID may
name. Section 11.4.4: “all objects on the stream belong to the track
requested in the message identified by Request ID”, where draft-19 said “the
track requested in the Fetch message”. The widening is deliberate, because a
fetch stream can
now be a fill fetch stream whose Request ID names the SUBSCRIBE or the
REQUEST_UPDATE that carried FILL_PARAMETERS (Section 5.1.3), not only a
FETCH. Nothing on the stream says which, so a reader that keys a fetch
stream by looking up a FETCH will fail to find one.
§Two things a fill fetch stream does not have, which the draft leaves open
- No
FETCH_OK, and therefore noEnd Locationand noEnd Of Track. Section 5.1.3 says the fill is “delivered as a FETCH response” and Section 5.1.3.1 says there is noREQUEST_ERRORfor it, so there is no OK either. How a subscriber learns the fill’s actual end, beyond the stream FINing, is unspecified; this codec treats the FIN as the only end signal and does not synthesize aFETCH_OK. Section 10.13’s rule that gaps between the last Object and the FETCH_OK’s Largest imply non-existence cannot be applied here, because there is no FETCH_OK to read it from. - Failure is a stream reset, not an error message. Section 5.1.3.1: if
the publisher must fail a fill it opens the stream and resets it
immediately after the
FETCH_HEADER. Resetting or cancelling a fill fetch stream does not affect the subscription, which keeps delivering.
Both are the caller’s to act on: neither is visible in a frame.
Fields§
§request_id: VarIntImplementations§
Trait Implementations§
Source§impl Clone for FetchHeader
impl Clone for FetchHeader
Source§fn clone(&self) -> FetchHeader
fn clone(&self) -> FetchHeader
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FetchHeader
impl RefUnwindSafe for FetchHeader
impl Send for FetchHeader
impl Sync for FetchHeader
impl Unpin for FetchHeader
impl UnsafeUnpin for FetchHeader
impl UnwindSafe for FetchHeader
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