pub enum Divergence {
Exact,
Advanced,
Diverged,
DifferentContext,
Unknown,
}Expand description
How far a record’s recorded commit is from the commit this checkout is on.
The four words are the shell tool’s, deliberately. A reader that met advanced from one
surface and stale from another would have to learn the same four facts twice.
Variants§
Exact
Written at this commit. Trust it.
Advanced
Git has moved forward since. Trust it, and expect some of it to be done.
Diverged
The recorded commit is not an ancestor: history was rewritten. Trust git, not this.
DifferentContext
Another branch or another worktree. This record is not about your work.
Unknown
Git could not answer, so this process says so rather than guessing exact.
Implementations§
Source§impl Divergence
impl Divergence
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
The word as serialised.
use majordomus_cli::capability::builtin::continuity::Divergence;
assert_eq!(Divergence::Advanced.as_str(), "advanced");Sourcepub fn trustworthy(self) -> bool
pub fn trustworthy(self) -> bool
Whether a record carrying this label may be read as current knowledge. diverged
and different_context may not: the first describes a history that no longer
exists, the second describes somebody else’s work.
use majordomus_cli::capability::builtin::continuity::Divergence;
assert!(Divergence::Advanced.trustworthy());
assert!(!Divergence::Diverged.trustworthy());Trait Implementations§
Source§impl Clone for Divergence
impl Clone for Divergence
Source§fn clone(&self) -> Divergence
fn clone(&self) -> Divergence
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for Divergence
Source§impl Debug for Divergence
impl Debug for Divergence
Source§impl<'de> Deserialize<'de> for Divergence
impl<'de> Deserialize<'de> for Divergence
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Divergence
Source§impl JsonSchema for Divergence
impl JsonSchema for Divergence
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl Ord for Divergence
impl Ord for Divergence
Source§fn cmp(&self, other: &Divergence) -> Ordering
fn cmp(&self, other: &Divergence) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for Divergence
impl PartialEq for Divergence
Source§fn eq(&self, other: &Divergence) -> bool
fn eq(&self, other: &Divergence) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for Divergence
impl PartialOrd for Divergence
Source§impl Serialize for Divergence
impl Serialize for Divergence
impl StructuralPartialEq for Divergence
Auto Trait Implementations§
impl Freeze for Divergence
impl RefUnwindSafe for Divergence
impl Send for Divergence
impl Sync for Divergence
impl Unpin for Divergence
impl UnsafeUnpin for Divergence
impl UnwindSafe for Divergence
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§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.