Skip to main content

FetchExistence

Struct FetchExistence 

Source
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: bool

Whether 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

Source

pub(crate) fn begin(&mut self, order: GroupOrder)

Judge the entries that follow as arriving in order.

Source

pub(crate) fn note_entry( &mut self, entry: &FetchObject, ) -> Result<(), EndpointError>

Record one entry, as the codec’s reader resolved it.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more