pub enum FreshnessCheck {
Stale {
old_commit: Option<String>,
new_commit: String,
},
UpToDate,
GitUnavailable,
}Expand description
Outcome of comparing a branch’s stored last_scanned_commit sentinel
against the current git rev-parse HEAD of root (US-010).
Variants§
Stale
HEAD differs from the stored sentinel — an incremental sync should run.
old_commit is the previously recorded HEAD; it is None when the
branch has never been scanned (e.g. a pre-US-009 DB or a fresh branch
row created without a recorded HEAD), and Some(...) otherwise. The
hash form is suitable to feed back into get_head_commit’s gix-tree
resolution as the old-side of a tree diff.
UpToDate
Sentinel matches HEAD — no sync is needed.
Git is unavailable for root (no .git, empty repo, gix open failed).
Per the PRD’s git-optional fallback, freshness checks short-circuit
and no sync is triggered.
Trait Implementations§
Source§impl Clone for FreshnessCheck
impl Clone for FreshnessCheck
Source§fn clone(&self) -> FreshnessCheck
fn clone(&self) -> FreshnessCheck
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FreshnessCheck
impl Debug for FreshnessCheck
impl Eq for FreshnessCheck
Source§impl PartialEq for FreshnessCheck
impl PartialEq for FreshnessCheck
Source§fn eq(&self, other: &FreshnessCheck) -> bool
fn eq(&self, other: &FreshnessCheck) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for FreshnessCheck
Auto Trait Implementations§
impl Freeze for FreshnessCheck
impl RefUnwindSafe for FreshnessCheck
impl Send for FreshnessCheck
impl Sync for FreshnessCheck
impl Unpin for FreshnessCheck
impl UnsafeUnpin for FreshnessCheck
impl UnwindSafe for FreshnessCheck
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.