pub struct DependencyMetrics {Show 13 fields
pub total_dependencies: usize,
pub components_with_deps: usize,
pub max_depth: Option<usize>,
pub avg_depth: Option<f32>,
pub orphan_components: usize,
pub root_components: usize,
pub cycle_count: usize,
pub island_count: usize,
pub graph_analysis_skipped: bool,
pub max_out_degree: usize,
pub software_complexity_index: Option<f32>,
pub complexity_level: Option<ComplexityLevel>,
pub complexity_factors: Option<ComplexityFactors>,
}Expand description
Dependency graph quality metrics
Fields§
§total_dependencies: usizeTotal dependency relationships
components_with_deps: usizeComponents with at least one dependency
max_depth: Option<usize>Maximum dependency depth (computed via BFS from roots)
avg_depth: Option<f32>Average dependency depth across all reachable components
orphan_components: usizeOrphan components (no incoming or outgoing deps)
root_components: usizeRoot components (no incoming deps, but has outgoing)
cycle_count: usizeNumber of dependency cycles detected
island_count: usizeNumber of disconnected subgraphs (islands)
graph_analysis_skipped: boolWhether graph analysis was skipped due to size
max_out_degree: usizeMaximum out-degree (most dependencies from a single component)
software_complexity_index: Option<f32>Software complexity index (0–100, higher = simpler). None when graph analysis skipped.
complexity_level: Option<ComplexityLevel>Complexity level band. None when graph analysis skipped.
complexity_factors: Option<ComplexityFactors>Factor breakdown. None when graph analysis skipped.
Implementations§
Source§impl DependencyMetrics
impl DependencyMetrics
Sourcepub fn from_sbom(sbom: &NormalizedSbom) -> Self
pub fn from_sbom(sbom: &NormalizedSbom) -> Self
Calculate dependency metrics from an SBOM
Sourcepub fn quality_score(&self, total_components: usize) -> f32
pub fn quality_score(&self, total_components: usize) -> f32
Calculate dependency graph quality score (0-100)
Trait Implementations§
Source§impl Clone for DependencyMetrics
impl Clone for DependencyMetrics
Source§fn clone(&self) -> DependencyMetrics
fn clone(&self) -> DependencyMetrics
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DependencyMetrics
impl Debug for DependencyMetrics
Source§impl<'de> Deserialize<'de> for DependencyMetrics
impl<'de> Deserialize<'de> for DependencyMetrics
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>,
Auto Trait Implementations§
impl Freeze for DependencyMetrics
impl RefUnwindSafe for DependencyMetrics
impl Send for DependencyMetrics
impl Sync for DependencyMetrics
impl Unpin for DependencyMetrics
impl UnsafeUnpin for DependencyMetrics
impl UnwindSafe for DependencyMetrics
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<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