Skip to main content

LineageIndex

Struct LineageIndex 

Source
pub struct LineageIndex { /* private fields */ }
Expand description

Index for lineage chain lookups and dependency tracking.

Implementations§

Source§

impl LineageIndex

Source

pub fn new() -> Self

Source

pub fn add_chain(&mut self, chain: &LineageChain)

Index a lineage chain.

Source

pub fn add_entry(&mut self, target: &str, entry: LineageEntry)

Add a single lineage entry for a target.

Source

pub fn trace(&self, target: &str) -> Option<&LineageChain>

Get the full lineage chain for a target.

Source

pub fn trust_score(&self, target: &str) -> f64

Get trust score for a target.

Source

pub fn impact_of(&self, source: &str) -> Vec<&str>

Impact analysis: if source changes, what targets are affected?

Source

pub fn sources_of(&self, target: &str) -> Vec<&str>

Source tracing: where did this target’s data come from?

Source

pub fn low_trust_targets(&self, threshold: f64) -> Vec<(&str, f64)>

Find all targets with low trust score.

Source

pub fn chain_count(&self) -> usize

Total indexed chains.

Source

pub fn fingerprint(&self, target: &str) -> Option<String>

Generate a DNA fingerprint for a target.

Trait Implementations§

Source§

impl Debug for LineageIndex

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for LineageIndex

Source§

fn default() -> LineageIndex

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.