Skip to main content

MalformedTrackCondition

Enum MalformedTrackCondition 

Source
pub enum MalformedTrackCondition {
    MixedForwardingPreference,
    ObjectPastFinalObject,
    ExistenceContradicted,
    PriorGroupIdGap,
    PriorGap,
    MalformedPropertyBlock,
}
Expand description

Which condition of the list made a track malformed.

One variant per condition this crate can actually detect, which is fewer than the drafts list. A condition nothing observes would be a name with no call site, and the list is explicitly not exhaustive in either direction.

Variants§

§

MixedForwardingPreference

“An Object is received with a different Forwarding Preference than previously observed from the same Track.”

Detected by crate::forwarding_preference, which holds the framing each track’s first object settled on.

§

ObjectPastFinalObject

“An Object is received on a Track whose Group and Object ID are larger than the final Object in the Track.”

Detected by crate::track_locations, which writes down where an end-of-track object said the track stopped and measures what arrives afterwards against it.

It reaches drafts the condition beside it does not. Draft-16 made the Forwarding Preference a property of an Object rather than of a Track, so there is nothing on that draft for a mixed-framing record to contradict; this condition is stated unchanged from draft-12 on and depends on nothing that moved.

§

ExistenceContradicted

“An Object is received after it has been recorded as not existing, or is signalled as not existing after it was received” (draft-23 Section 12.1).

Detected by crate::track_locations, which records the Objects a track has carried and the ranges signalled as not existing.

§

PriorGroupIdGap

“A track with a Group that contains more than one Object with different values for Prior Group ID Gap or has a Prior Group ID Gap larger than the Group ID is considered malformed” (draft-12 Section 10.1, draft-13 Section 10.1).

Detected by the codec’s SubgroupGaps, which a subgroup stream reader holds for one stream.

§

PriorGap

A Prior Group ID Gap or Prior Object ID Gap condition, on drafts 14-23: draft-14 Section 11.1, draft-14 Section 11.3, draft-15 Section 11.1, draft-15 Section 11.2, draft-16 Section 11.3, draft-16 Section 11.4, draft-17 Section 11.7, draft-17 Section 11.8, draft-18 Section 12.8, draft-18 Section 12.9, draft-19 Section 12.8, draft-19 Section 12.9, draft-20 Section 12.8, draft-20 Section 12.9, draft-21 Section 10.8, draft-21 Section 10.9, draft-22 Section 10.8, draft-22 Section 10.9, draft-23 Section 10.8 and draft-23 Section 10.9.

Detected by the codec’s subgroup, datagram and fetch readers, whose MalformedTrack error does not say which of the two gaps it was.

§

MalformedPropertyBlock

“An Object contains an Immutable Extensions header that contains another Immutable Extensions key” (Immutable Properties from draft-17) or “A Key-Value-Pair cannot be parsed”, on drafts 14-23: draft-14 Section 11.2, draft-15 Section 11.1, draft-16 Section 11.2, draft-17 Section 11.6, draft-18 Section 12.7, draft-19 Section 12.7, draft-20 Section 12.7, draft-21 Section 10.7, draft-22 Section 10.7 and draft-23 Section 10.7.

Detected by the codec’s subgroup, datagram and fetch readers, whose MalformedObjectProperties error does not say which of the two it was.

Trait Implementations§

Source§

impl Clone for MalformedTrackCondition

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 MalformedTrackCondition

Source§

impl Debug for MalformedTrackCondition

Source§

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

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

impl Display for MalformedTrackCondition

Source§

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

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

impl Eq for MalformedTrackCondition

Source§

impl PartialEq for MalformedTrackCondition

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 MalformedTrackCondition

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.

§

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> 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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.
§

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