pub struct QualityDelta {
pub overall_score_delta: f32,
pub old_grade: Option<QualityGrade>,
pub new_grade: Option<QualityGrade>,
pub category_deltas: Vec<CategoryDelta>,
pub regressions: Vec<String>,
pub improvements: Vec<String>,
pub violation_count_delta: i32,
}Expand description
Quality and compliance impact of the diff.
Computed by comparing quality scores of old vs new SBOMs. Enables tracking whether a change improves or degrades SBOM quality.
Fields§
§overall_score_delta: f32Overall score change (positive = improvement)
old_grade: Option<QualityGrade>Old grade
new_grade: Option<QualityGrade>New grade
category_deltas: Vec<CategoryDelta>Per-category score deltas
regressions: Vec<String>Categories that regressed (score decreased by >1 point)
improvements: Vec<String>Categories that improved (score increased by >1 point)
violation_count_delta: i32Compliance violation count change (positive = more violations)
Implementations§
Source§impl QualityDelta
impl QualityDelta
Sourcepub fn from_reports(old: &QualityReport, new: &QualityReport) -> Self
pub fn from_reports(old: &QualityReport, new: &QualityReport) -> Self
Compute quality delta by comparing two quality reports.
Trait Implementations§
Source§impl Clone for QualityDelta
impl Clone for QualityDelta
Source§fn clone(&self) -> QualityDelta
fn clone(&self) -> QualityDelta
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 QualityDelta
impl Debug for QualityDelta
Source§impl Default for QualityDelta
impl Default for QualityDelta
Source§fn default() -> QualityDelta
fn default() -> QualityDelta
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for QualityDelta
impl<'de> Deserialize<'de> for QualityDelta
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 QualityDelta
impl RefUnwindSafe for QualityDelta
impl Send for QualityDelta
impl Sync for QualityDelta
impl Unpin for QualityDelta
impl UnsafeUnpin for QualityDelta
impl UnwindSafe for QualityDelta
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