pub enum Spelling {
Local,
Shared,
Canonical,
}Expand description
Which store a recorded identity was read from, kept beside the value.
The point is not to choose between mj_git_repo_id and mj_repository_id, or between
worktree: and worktree_id:. It is to stop pretending they are one value. A reader
that knows a string is the local spelling can compare it with other local spellings
and can refuse to compare it with a shared one, which is precisely the comparison that
produced “these two records are about different repositories” for records of the same
repository written four minutes apart.
use majordomus_cli::session::Spelling;
// the two halves are different answers to one question, and are never compared
assert_ne!(Spelling::Local, Spelling::Shared);
assert_eq!(Spelling::Canonical.as_str(), "canonical");Variants§
Local
The local half’s spelling: a path, in .ai/local/state/. It names this disk and is
never published.
The shared half’s spelling: a remote URL or a digest, in .ai/repo/sessions/. It
names the repository and travels with a clone (ADR 0014).
Canonical
This executable’s own canonical digest, computed rather than read.
Implementations§
Trait Implementations§
impl Copy for Spelling
Source§impl<'de> Deserialize<'de> for Spelling
impl<'de> Deserialize<'de> for Spelling
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 Spelling
Source§impl JsonSchema for Spelling
impl JsonSchema for Spelling
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 Spelling
impl Ord for Spelling
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for Spelling
impl PartialOrd for Spelling
impl StructuralPartialEq for Spelling
Auto Trait Implementations§
impl Freeze for Spelling
impl RefUnwindSafe for Spelling
impl Send for Spelling
impl Sync for Spelling
impl Unpin for Spelling
impl UnsafeUnpin for Spelling
impl UnwindSafe for Spelling
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.