pub fn depth_continues(prev: Option<u64>, next: Option<u64>) -> boolExpand description
Whether a book with change_id next continues the sequence after prev
(docs/03-data-providers.md §8) — the domain’s coarse gap signal:
(Some(p), Some(n))→n >= p: the sequence advances (or repeats a coalesced value); a regression (n < p) means the venue re-seeded a fresh book (a resubscribe / reset), a discontinuity requiring resync.(Some(_), None)→false: the sequence was tracked and is now lost — a resync boundary.(None, _)→true: the first ladder, or a feed that carries no sequence at all — there is no discontinuity to detect, so it never false-flags a resync.
This treats a forward skip as continuous, which is correct for the grouped full-snapshot book channel the adapter subscribes: a coalesced snapshot the channel dropped is not a gap, so a forward skip never spuriously flags a resync. Only a regression or a lost sequence is a real discontinuity. The re-fetch that repairs a flagged book is the adapter’s job (#51).