pub enum SourceTier {
Primary,
Secondary,
Fallback,
Opaque,
}Expand description
Explicit trust tier for a repo identity signal.
Not all evidence for “which repo is this?” is equal. A git remote URL is canonical truth; a directory layout is a strong hint; a hex hash is opaque noise. This enum makes the distinction machine-readable so the store can decide whether to assert identity or route to fallback.
Variants§
Primary
Git remote URL or explicit GitHub/GitLab link in message text. The strongest signal — the repo literally named itself.
Secondary
Local git repo discovered on disk (via .git/ traversal + known layout),
or a projectHash resolved through a trustworthy local mapping file.
Fallback
Known directory layout (e.g. ~/hosted/<org>/<repo>) without a .git/
directory or remote confirmation. Plausible but not proven.
Opaque
Hex hash, opaque identifier, or source that is explicitly not a
conversation (e.g. .pb protobuf, step-output). Must never assert
repo identity on its own.
Implementations§
Source§impl SourceTier
impl SourceTier
Sourcepub fn is_assertable(self) -> bool
pub fn is_assertable(self) -> bool
Whether this tier is strong enough to assert repo identity for
canonical store placement (under store/<org>/<repo>/).
Trait Implementations§
Source§impl Clone for SourceTier
impl Clone for SourceTier
Source§fn clone(&self) -> SourceTier
fn clone(&self) -> SourceTier
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SourceTier
impl Debug for SourceTier
Source§impl<'de> Deserialize<'de> for SourceTier
impl<'de> Deserialize<'de> for SourceTier
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>,
Source§impl Hash for SourceTier
impl Hash for SourceTier
Source§impl Ord for SourceTier
impl Ord for SourceTier
Source§fn cmp(&self, other: &SourceTier) -> Ordering
fn cmp(&self, other: &SourceTier) -> 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 SourceTier
impl PartialEq for SourceTier
Source§fn eq(&self, other: &SourceTier) -> bool
fn eq(&self, other: &SourceTier) -> bool
self and other values to be equal, and is used by ==.