Skip to main content

SubgroupGaps

Struct SubgroupGaps 

Source
pub struct SubgroupGaps {
    group_id: u64,
    common: Option<Vec<u64>>,
}
Expand description

The Prior Group ID Gap values the Objects of one subgroup stream carried.

A subgroup stream carries one Group, so its Objects are where “a Group that contains more than one Object with different values for Prior Group ID Gap” (draft-11 Section 10.1) shows on one stream.

This draft does not say whether an Object may carry 0x40 more than once, or which value is that Object’s when it does. draft-11 Section 9.1.1.2 says only “Object Extension Headers are serialized as Key-Value-Pairs”, and the no-repeat rule of draft-11 Section 8.2, “Senders MUST NOT repeat the same parameter type in a message”, covers message Parameters. So the Objects carry different values only when no value is carried by every one of them: then, whichever of its values is taken as each Object’s, two of them differ. While a value is common to all, taking it as each Object’s makes them equal, and they are not refused. The values one Object carries are not compared with each other, since the condition needs “more than one Object”.

“has a Prior Group ID Gap larger than the Group ID” (draft-11 Section 10.1) also depends on which value is the Object’s. An Object carrying a value larger than the Group ID and one that is not has a gap larger than the Group ID under one reading and not under another, so it is refused only when every value it carries is larger.

Fields§

§group_id: u64§common: Option<Vec<u64>>

The values every earlier Object that carried a gap carried, or None before the first such Object.

Implementations§

Source§

impl SubgroupGaps

Source

pub fn new(header: &SubgroupHeader) -> Self

Track the Objects of the stream header opens.

Source

pub fn check(&mut self, object: &ObjectHeader) -> Result<PriorGaps, CodecError>

Check the next Object on this stream, refusing with CodecError::MalformedTrack a gap larger than the Group ID, or values that leave no value common to every Object on the stream that carried a gap. Records the Object only when it passes.

Trait Implementations§

Source§

impl Clone for SubgroupGaps

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 SubgroupGaps

Source§

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

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

impl Eq for SubgroupGaps

Source§

impl PartialEq for SubgroupGaps

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 SubgroupGaps

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.