pub struct Diff {
pub added: Vec<Component>,
pub removed: Vec<Component>,
pub changed: Vec<ComponentChange>,
pub edge_diffs: Vec<EdgeDiff>,
pub metadata_changed: bool,
}Expand description
The result of comparing two SBOMs.
Contains lists of added, removed, and changed components, as well as dependency edge changes.
Fields§
§added: Vec<Component>Components present in the new SBOM but not the old.
removed: Vec<Component>Components present in the old SBOM but not the new.
changed: Vec<ComponentChange>Components present in both with field-level changes.
edge_diffs: Vec<EdgeDiff>Dependency edge changes between components.
metadata_changed: boolWhether document metadata differs (usually ignored).
Implementations§
Source§impl Diff
impl Diff
Sourcepub fn ecosystem_breakdown(&self) -> BTreeMap<String, EcosystemCounts>
pub fn ecosystem_breakdown(&self) -> BTreeMap<String, EcosystemCounts>
Groups added/removed/changed counts by package ecosystem.
Components without an ecosystem are grouped under "unknown".
Sourcepub fn group_by_ecosystem(&self) -> GroupedDiff
pub fn group_by_ecosystem(&self) -> GroupedDiff
Groups the full diff by ecosystem, returning per-ecosystem slices.
Components without an ecosystem are grouped under "unknown".
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Diff
impl<'de> Deserialize<'de> for Diff
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 Diff
impl RefUnwindSafe for Diff
impl Send for Diff
impl Sync for Diff
impl Unpin for Diff
impl UnsafeUnpin for Diff
impl UnwindSafe for Diff
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