pub struct LifecycleMetrics {
pub eol_components: usize,
pub stale_components: usize,
pub deprecated_components: usize,
pub archived_components: usize,
pub outdated_components: usize,
pub enriched_components: usize,
pub enrichment_coverage: f32,
}Expand description
Component lifecycle quality metrics (requires enrichment data)
Fields§
§eol_components: usizeComponents that have reached end-of-life
stale_components: usizeComponents classified as stale (no updates for 1+ years)
deprecated_components: usizeComponents explicitly marked as deprecated
archived_components: usizeComponents with archived repositories
outdated_components: usizeComponents with a newer version available
enriched_components: usizeComponents that had lifecycle enrichment data
enrichment_coverage: f32Enrichment coverage percentage (0-100)
Implementations§
Source§impl LifecycleMetrics
impl LifecycleMetrics
Sourcepub fn from_sbom(sbom: &NormalizedSbom) -> Self
pub fn from_sbom(sbom: &NormalizedSbom) -> Self
Calculate lifecycle metrics from an SBOM
These metrics are only meaningful after enrichment. When
enrichment_coverage == 0, the lifecycle score should be
treated as N/A and excluded from the weighted total.
Sourcepub fn quality_score(&self) -> Option<f32>
pub fn quality_score(&self) -> Option<f32>
Calculate lifecycle quality score (0-100)
Starts at 100, subtracts penalties for problematic components.
Returns None if no enrichment data is available.
Trait Implementations§
Source§impl Clone for LifecycleMetrics
impl Clone for LifecycleMetrics
Source§fn clone(&self) -> LifecycleMetrics
fn clone(&self) -> LifecycleMetrics
Returns a duplicate of the value. Read more
1.0.0 · 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 LifecycleMetrics
impl Debug for LifecycleMetrics
Source§impl<'de> Deserialize<'de> for LifecycleMetrics
impl<'de> Deserialize<'de> for LifecycleMetrics
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for LifecycleMetrics
impl RefUnwindSafe for LifecycleMetrics
impl Send for LifecycleMetrics
impl Sync for LifecycleMetrics
impl Unpin for LifecycleMetrics
impl UnsafeUnpin for LifecycleMetrics
impl UnwindSafe for LifecycleMetrics
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
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>
Converts
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>
Converts
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