pub enum SequenceObservation {
First,
InOrder,
Gap {
missing: Vec<u32>,
missing_count: u64,
},
FilledGap,
Duplicate,
Unexpected,
OutOfSpace,
}Expand description
What happened when a sequence number arrived.
Variants§
First
The first value seen from this source; nothing can be concluded yet.
InOrder
The immediate successor of the previous high-water mark.
Gap
A forward jump: the listed values have not arrived.
Carries the identities rather than a count, because the operational response is a resend request for exactly these — and it carries the exact count beside them, because the list is bounded and the count is not. A jump of four billion names ten thousand files and counts all four billion; a tracker that only knew what it could list would report a source as complete while most of it was missing.
Fields
FilledGap
A value behind the high-water mark that fills a known hole.
Duplicate
A value behind the high-water mark that was already seen.
Unexpected
A value behind the high-water mark that was never expected.
Either a stale resend from before tracking began, or a value from a different source misrouted into this one.
OutOfSpace
The value does not belong to this tracker’s space.
Implementations§
Source§impl SequenceObservation
impl SequenceObservation
Sourcepub fn opened_a_gap(&self) -> bool
pub fn opened_a_gap(&self) -> bool
true when the observation revealed newly missing files.
Sourcepub const fn missing_count(&self) -> u64
pub const fn missing_count(&self) -> u64
How many identities the observation revealed as missing.
Zero for every observation but a gap, and exact for a gap even where the listed identities were truncated.
Sourcepub fn missing_is_truncated(&self) -> bool
pub fn missing_is_truncated(&self) -> bool
true when a gap named fewer identities than it counted.