pub struct LineageIndex { /* private fields */ }Expand description
Index for lineage chain lookups and dependency tracking.
Implementations§
Source§impl LineageIndex
impl LineageIndex
pub fn new() -> Self
Sourcepub fn add_chain(&mut self, chain: &LineageChain)
pub fn add_chain(&mut self, chain: &LineageChain)
Index a lineage chain.
Sourcepub fn add_entry(&mut self, target: &str, entry: LineageEntry)
pub fn add_entry(&mut self, target: &str, entry: LineageEntry)
Add a single lineage entry for a target.
Sourcepub fn trace(&self, target: &str) -> Option<&LineageChain>
pub fn trace(&self, target: &str) -> Option<&LineageChain>
Get the full lineage chain for a target.
Sourcepub fn trust_score(&self, target: &str) -> f64
pub fn trust_score(&self, target: &str) -> f64
Get trust score for a target.
Sourcepub fn impact_of(&self, source: &str) -> Vec<&str>
pub fn impact_of(&self, source: &str) -> Vec<&str>
Impact analysis: if source changes, what targets are affected?
Sourcepub fn sources_of(&self, target: &str) -> Vec<&str>
pub fn sources_of(&self, target: &str) -> Vec<&str>
Source tracing: where did this target’s data come from?
Sourcepub fn low_trust_targets(&self, threshold: f64) -> Vec<(&str, f64)>
pub fn low_trust_targets(&self, threshold: f64) -> Vec<(&str, f64)>
Find all targets with low trust score.
Sourcepub fn chain_count(&self) -> usize
pub fn chain_count(&self) -> usize
Total indexed chains.
Sourcepub fn fingerprint(&self, target: &str) -> Option<String>
pub fn fingerprint(&self, target: &str) -> Option<String>
Generate a DNA fingerprint for a target.
Trait Implementations§
Source§impl Debug for LineageIndex
impl Debug for LineageIndex
Source§impl Default for LineageIndex
impl Default for LineageIndex
Source§fn default() -> LineageIndex
fn default() -> LineageIndex
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LineageIndex
impl RefUnwindSafe for LineageIndex
impl Send for LineageIndex
impl Sync for LineageIndex
impl Unpin for LineageIndex
impl UnsafeUnpin for LineageIndex
impl UnwindSafe for LineageIndex
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