pub(crate) struct FetchExistence {
track: TrackExistence,
range_filtered: bool,
order: GroupOrder,
prior: Option<ObjectLocation>,
}Expand description
What one FETCH stream’s entries say about which of its track’s Objects exist.
draft-23 Section 3.2.2: “Unless the request included Range Filters (see Section 3.3.2), any gaps in the Group and Object IDs in the response stream that are not otherwise marked indicate objects that do not exist (see Section 2.1.2). When one or more Range Filters are present, unmarked gaps indicate objects in the Unknown state.” Section 11.4.2: the Objects between the last serialized Object and an End of Range indicator, inclusive, “either do not exist (when Serialization Flags is 0x8C), are Unknown (0x10C), are timed out (0x20C), or are Gone (0x40C)”. Only Does Not Exist is recorded. Section 2.1.2: “receiving an Object that was recorded as Gone or Unknown is not an error.”
Only the gaps between two entries of the stream are judged. The gaps before the first entry and after the last are measured against the Start and End Location, and Section 3.2.2’s End Location is “the LARGEST_OBJECT in FETCH_OK if present”, which can arrive after the stream has ended. An End of Non-Existent Range that is the first entry is not recorded, for the same reason. An indicator’s span starts after the entry before it, which is the last serialized Object or an earlier indicator.
Fields§
§track: TrackExistence§range_filtered: boolWhether the FETCH carried a Range Filter, which makes an unmarked gap Unknown rather than Does Not Exist.
order: GroupOrder§prior: Option<ObjectLocation>The Location the next entry’s gap is measured from. After End of Group or End of Track it is the end of that Group, as Section 11.4.2.2 has it: “The prior Object ID becomes 2^64-1.”
Implementations§
Source§impl FetchExistence
impl FetchExistence
Sourcepub(crate) fn begin(&mut self, order: GroupOrder)
pub(crate) fn begin(&mut self, order: GroupOrder)
Judge the entries that follow as arriving in order.
Sourcepub(crate) fn note_entry(
&mut self,
entry: &FetchObject,
) -> Result<(), EndpointError>
pub(crate) fn note_entry( &mut self, entry: &FetchObject, ) -> Result<(), EndpointError>
Record one entry, as the codec’s reader resolved it.