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.