Skip to main content

GapRules

Enum GapRules 

Source
pub(crate) enum GapRules {
    Draft11To13,
    Draft14To15,
    Draft16To17,
    Draft18To22,
    Draft23On,
}
Expand description

Which Prior gap conditions a draft states without contradicting itself.

Variants§

§

Draft11To13

draft-11 Section 10.1, draft-12 Section 10.1 and draft-13 Section 10.1: an Object may carry Prior Group ID Gap more than once, there is no Prior Object ID Gap, and no condition about a gap covering an earlier Object.

§

Draft14To15

draft-14 Section 11.1, draft-14 Section 11.3, draft-15 Section 11.1 and draft-15 Section 11.2: one instance of each gap per Object, “An endpoint receives an Object with a Prior Group ID Gap covering an Object it previously received”, its Prior Object ID Gap twin, and “An endpoint receives an Object with a Group ID within a previously communicated gap” and its twin.

§

Draft16To17

Drafts 16-17 state the conditions of drafts 14-15, but draft-16 Section 2.1 and draft-17 Section 2.1 say of an Object known to exist: “From this state, it can transition to not existing, but not vice versa.” A gap covering an Object already received is that transition, so the two covering conditions are ambiguous and not checked.

§

Draft18To22

Drafts 18-22 add, in draft-18 Section 2.1, draft-19 Section 2.1, draft-20 Section 2.1, draft-21 Section 2.1.1 and draft-22 Section 2.1.2: “an endpoint can receive an Object after it has already recorded that the Object does not exist […] This is not a protocol error and the Track is not malformed.” So the two within-gap conditions are ambiguous too, and neither pair is checked.

§

Draft23On

draft-23 Section 10.8 and draft-23 Section 10.9 state all four, and draft-23 Section 2.1.2 drops both sentences above.

Implementations§

Source§

impl GapRules

Source

fn checks_covering(self) -> bool

A gap covering the Group or Object before it on the stream is refused.

Source

fn checks_within(self) -> bool

A Group or Object within the gap the one before it communicated is refused.

Trait Implementations§

Source§

impl Clone for GapRules

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 Copy for GapRules

Source§

impl Debug for GapRules

Source§

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

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

impl Eq for GapRules

Source§

impl PartialEq for GapRules

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 GapRules

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.