pub enum DiscoverySource {
CargoPackageName,
CargoBinaryName,
FirstLetterAbbrev,
GitRemote,
}Expand description
Where a discovered alias was inferred from.
Why: Surfaced through the MCP tool response so operators can audit why
a particular alias landed in the KG (and which signal to trust). Also
serialised into the triple’s provenance field so retraction tooling can
distinguish auto-discovered facts from hand-asserted ones.
What: Serialize for direct JSON emission; Debug for tracing logs.
Test: covered indirectly through discover_project_aliases tests.
Variants§
CargoPackageName
[package].name differs from the containing directory name.
CargoBinaryName
[[bin]].name differs from [package].name.
FirstLetterAbbrev
First-letter abbreviation of a hyphenated package name is globally unique within the workspace.
GitRemote
Short name extracted from the origin remote URL in .git/config.
Implementations§
Source§impl DiscoverySource
impl DiscoverySource
Sourcepub fn as_str(&self) -> &'static str
pub fn as_str(&self) -> &'static str
Stable string representation for triple provenance + JSON.
Why: serde_json::to_string on the enum yields "CargoPackageName",
but the triple’s provenance field is plain text — we want a single
canonical spelling that round-trips cleanly.
What: lowercase, snake-case-ish identifiers matching the variant names.
Test: indirectly via discover_and_assert triples.
Trait Implementations§
Source§impl Clone for DiscoverySource
impl Clone for DiscoverySource
Source§fn clone(&self) -> DiscoverySource
fn clone(&self) -> DiscoverySource
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 DiscoverySource
impl Debug for DiscoverySource
Source§impl PartialEq for DiscoverySource
impl PartialEq for DiscoverySource
Source§fn eq(&self, other: &DiscoverySource) -> bool
fn eq(&self, other: &DiscoverySource) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for DiscoverySource
impl Serialize for DiscoverySource
impl Copy for DiscoverySource
impl Eq for DiscoverySource
impl StructuralPartialEq for DiscoverySource
Auto Trait Implementations§
impl Freeze for DiscoverySource
impl RefUnwindSafe for DiscoverySource
impl Send for DiscoverySource
impl Sync for DiscoverySource
impl Unpin for DiscoverySource
impl UnsafeUnpin for DiscoverySource
impl UnwindSafe for DiscoverySource
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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