pub struct IncrementalDiffEngine { /* private fields */ }Expand description
A diff engine wrapper that supports incremental computation and caching.
Wraps the standard DiffEngine and adds:
- Result caching for repeated comparisons
- Section-level change detection
- Incremental recomputation for partial changes
Implementations§
Source§impl IncrementalDiffEngine
impl IncrementalDiffEngine
Sourcepub fn new(engine: DiffEngine) -> Self
pub fn new(engine: DiffEngine) -> Self
Create a new incremental diff engine.
Sourcepub fn with_cache_config(engine: DiffEngine, config: DiffCacheConfig) -> Self
pub fn with_cache_config(engine: DiffEngine, config: DiffCacheConfig) -> Self
Create with custom cache configuration.
Sourcepub fn diff(
&self,
old: &NormalizedSbom,
new: &NormalizedSbom,
) -> IncrementalDiffResult
pub fn diff( &self, old: &NormalizedSbom, new: &NormalizedSbom, ) -> IncrementalDiffResult
Perform a diff, using cache when possible.
Returns the diff result and metadata about cache usage.
Sourcepub const fn engine(&self) -> &DiffEngine
pub const fn engine(&self) -> &DiffEngine
Get the underlying engine.
Sourcepub fn cache_stats(&self) -> CacheStats
pub fn cache_stats(&self) -> CacheStats
Get cache statistics.
Sourcepub fn clear_cache(&self)
pub fn clear_cache(&self)
Clear the cache.
Auto Trait Implementations§
impl !Freeze for IncrementalDiffEngine
impl !RefUnwindSafe for IncrementalDiffEngine
impl Send for IncrementalDiffEngine
impl Sync for IncrementalDiffEngine
impl Unpin for IncrementalDiffEngine
impl UnsafeUnpin for IncrementalDiffEngine
impl !UnwindSafe for IncrementalDiffEngine
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