pub struct ReverseDepIndex { /* private fields */ }Expand description
v0.49.3: reverse-dependency index built from a Project’s forward
links graph. Maps finding_id → [dependent_finding_id, …] so a
“what depends on X?” lookup is O(1) instead of O(N×L).
Construct via Project::build_reverse_dep_index. The index is a
snapshot — it does not auto-update if the Project mutates after.
For long-lived consumers that mutate state, rebuild after each
reduce step.
Implementations§
Source§impl ReverseDepIndex
impl ReverseDepIndex
Sourcepub fn dependents_of(&self, finding_id: &str) -> &[String]
pub fn dependents_of(&self, finding_id: &str) -> &[String]
Findings whose forward links list a target with this id.
Empty slice if nothing depends on this finding (or if the id
isn’t in the index at all).
Sourcepub fn edge_count(&self) -> usize
pub fn edge_count(&self) -> usize
Total number of dependent edges in the index. Useful for quick sanity checks and metric reporting.
Sourcepub fn target_count(&self) -> usize
pub fn target_count(&self) -> usize
Number of distinct findings that have at least one dependent.
Trait Implementations§
Source§impl Clone for ReverseDepIndex
impl Clone for ReverseDepIndex
Source§fn clone(&self) -> ReverseDepIndex
fn clone(&self) -> ReverseDepIndex
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ReverseDepIndex
impl Debug for ReverseDepIndex
Source§impl Default for ReverseDepIndex
impl Default for ReverseDepIndex
Source§fn default() -> ReverseDepIndex
fn default() -> ReverseDepIndex
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ReverseDepIndex
impl RefUnwindSafe for ReverseDepIndex
impl Send for ReverseDepIndex
impl Sync for ReverseDepIndex
impl Unpin for ReverseDepIndex
impl UnsafeUnpin for ReverseDepIndex
impl UnwindSafe for ReverseDepIndex
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