pub enum Reachability {
Reachable,
Unreachable,
Indeterminate {
missing: Vec<ID>,
},
}Expand description
Verdict of a bounded, tree-scoped reachability query
(check_targets_reachable_from).
The three states exist so a caller can tell a proven negative apart from “not enough local history to decide” — a distinction that matters for a sync system, where the latter is transient and self-heals once more of the tree arrives.
Variants§
Reachable
Every target is an ancestor-or-equal of some from entry, proven
against fully-present history within the height bound.
Unreachable
Proven negative: the region at or above the target floor was fully
present locally and at least one target is not an ancestor of from
(e.g. a snapshot regression, or a foreign/fabricated tip).
Indeterminate
Undecidable from local history: a target, a from tip, or an ancestor
needed to reach a target is missing locally. missing is the set of
entries whose absence blocked the decision — the caller should sync
these and re-check. It is the current blocking frontier, not
necessarily the whole gap: fetching it may reveal a further layer. The
height bound keeps this set small.
Trait Implementations§
Source§impl Clone for Reachability
impl Clone for Reachability
Source§fn clone(&self) -> Reachability
fn clone(&self) -> Reachability
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Reachability
impl Debug for Reachability
Source§impl PartialEq for Reachability
impl PartialEq for Reachability
impl Eq for Reachability
impl StructuralPartialEq for Reachability
Auto Trait Implementations§
impl Freeze for Reachability
impl RefUnwindSafe for Reachability
impl Send for Reachability
impl Sync for Reachability
impl Unpin for Reachability
impl UnsafeUnpin for Reachability
impl UnwindSafe for Reachability
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more