Skip to main content

FetchGaps

Struct FetchGaps 

Source
pub struct FetchGaps(Box<FetchGapTracker>);
Expand description

The Prior Group ID Gap conditions of draft-13 Section 10.1 that one fetch stream shows.

PriorGaps::from_extensions refuses a gap larger than the Group ID. Across the stream this refuses Objects of one Group with no value in common, read as SubgroupGaps reads them, and “an Object with a Group ID within a previously communicated gap” for the Group before on the stream. An Object whose values differ has communicated at least the least of them, whichever is that Object’s. draft-13 Section 8.16: “Within each group, objects are sent in Object ID order; subgroup ID is not used for ordering.”

FetchObjectHeader::decode reads one Object and applies none of this: a reader of a fetch stream checks each Object with one FetchGaps.

Tuple Fields§

§0: Box<FetchGapTracker>

Implementations§

Source§

impl FetchGaps

Source

pub fn new() -> Self

Track the Objects of one fetch stream.

Source

pub fn check( &mut self, group_id: u64, object_id: u64, extensions: &[u8], ) -> Result<PriorGaps, CodecError>

Check the next Object on the stream, from its Group ID, Object ID and extension block, refusing a gap condition with CodecError::MalformedTrack and a block that does not parse as parse_object_properties does. Records the Object only when it passes.

Trait Implementations§

Source§

impl Clone for FetchGaps

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FetchGaps

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for FetchGaps

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for FetchGaps

Source§

impl PartialEq for FetchGaps

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for FetchGaps

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.