Skip to main content

ChangeComputer

Trait ChangeComputer 

Source
pub trait ChangeComputer: Send + Sync {
    type ChangeSet;

    // Required methods
    fn compute(
        &self,
        old: &NormalizedSbom,
        new: &NormalizedSbom,
        matches: &ComponentMatches,
    ) -> Self::ChangeSet;
    fn name(&self) -> &str;
}
Expand description

Trait for computing a specific type of change between SBOMs.

Implementors provide logic for detecting a particular category of changes (components, dependencies, licenses, vulnerabilities).

Required Associated Types§

Source

type ChangeSet

The type of changes this computer produces.

Required Methods§

Source

fn compute( &self, old: &NormalizedSbom, new: &NormalizedSbom, matches: &ComponentMatches, ) -> Self::ChangeSet

Compute changes between old and new SBOMs given component matches.

Source

fn name(&self) -> &str

Get the name of this change computer for logging/debugging.

Implementors§