pub struct MultiDiffEngine { /* private fields */ }Expand description
Engine for multi-SBOM comparisons.
Internally wraps an IncrementalDiffEngine so that repeated comparisons
of the same SBOM pairs (common in timeline and matrix modes) benefit from
result caching.
Implementations§
Source§impl MultiDiffEngine
impl MultiDiffEngine
pub const fn new() -> Self
Sourcepub fn with_fuzzy_config(self, config: FuzzyMatchConfig) -> Self
pub fn with_fuzzy_config(self, config: FuzzyMatchConfig) -> Self
Configure fuzzy matching
Sourcepub fn include_unchanged(self, include: bool) -> Self
pub fn include_unchanged(self, include: bool) -> Self
Include unchanged components
Sourcepub fn with_graph_diff(self, config: GraphDiffConfig) -> Self
pub fn with_graph_diff(self, config: GraphDiffConfig) -> Self
Enable graph-aware diffing with the given configuration
Sourcepub fn with_matching_rules(self, rules: MatchingRulesConfig) -> Self
pub fn with_matching_rules(self, rules: MatchingRulesConfig) -> Self
Apply custom matching rules to every pairwise diff.
Sourcepub fn diff_multi(
&mut self,
baseline: &NormalizedSbom,
baseline_name: &str,
baseline_path: &str,
targets: &[(&NormalizedSbom, &str, &str)],
) -> Result<MultiDiffResult, SbomDiffError>
pub fn diff_multi( &mut self, baseline: &NormalizedSbom, baseline_name: &str, baseline_path: &str, targets: &[(&NormalizedSbom, &str, &str)], ) -> Result<MultiDiffResult, SbomDiffError>
Perform 1:N diff-multi comparison (baseline vs multiple targets)
§Errors
Returns an error if any pairwise diff computation fails.
Sourcepub fn timeline(
&mut self,
sboms: &[(&NormalizedSbom, &str, &str)],
) -> Result<TimelineResult, SbomDiffError>
pub fn timeline( &mut self, sboms: &[(&NormalizedSbom, &str, &str)], ) -> Result<TimelineResult, SbomDiffError>
Perform timeline analysis across ordered SBOM versions
§Errors
Returns an error if any pairwise diff computation fails.
Sourcepub fn matrix(
&mut self,
sboms: &[(&NormalizedSbom, &str, &str)],
similarity_threshold: Option<f64>,
) -> Result<MatrixResult, SbomDiffError>
pub fn matrix( &mut self, sboms: &[(&NormalizedSbom, &str, &str)], similarity_threshold: Option<f64>, ) -> Result<MatrixResult, SbomDiffError>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for MultiDiffEngine
impl !RefUnwindSafe for MultiDiffEngine
impl !UnwindSafe for MultiDiffEngine
impl Send for MultiDiffEngine
impl Sync for MultiDiffEngine
impl Unpin for MultiDiffEngine
impl UnsafeUnpin for MultiDiffEngine
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> 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