Skip to main content

DiffCalculator

Trait DiffCalculator 

Source
pub trait DiffCalculator: Send + Sync {
    // Required method
    fn calculate_diff(
        &self,
        from: &SchemaSnapshot,
        to: &SchemaSnapshot,
    ) -> SchemaDiff;
}
Expand description

Trait for calculating diffs between snapshots

This abstraction allows different diff algorithms to be plugged in, potentially supporting different strategies (e.g., three-way merge, conflict detection, etc.)

Required Methods§

Source

fn calculate_diff( &self, from: &SchemaSnapshot, to: &SchemaSnapshot, ) -> SchemaDiff

Calculate the diff between two snapshots

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§