pub trait SchemaAnalyzer {
// Required methods
fn analyze_compatibility(
&self,
old: &Schema,
new: &Schema,
) -> Result<CompatibilityReport, SchemaDiffError>;
fn generate_migration_path(
&self,
old: &Schema,
new: &Schema,
) -> Result<MigrationPlan, SchemaDiffError>;
fn validate_changes(
&self,
changes: &[SchemaChange],
) -> Result<ValidationResult, SchemaDiffError>;
}Expand description
Core trait for implementing schema analyzers
This trait defines the required functionality for analyzing schema changes and generating compatibility reports and migration paths.
Required Methods§
Sourcefn analyze_compatibility(
&self,
old: &Schema,
new: &Schema,
) -> Result<CompatibilityReport, SchemaDiffError>
fn analyze_compatibility( &self, old: &Schema, new: &Schema, ) -> Result<CompatibilityReport, SchemaDiffError>
Sourcefn generate_migration_path(
&self,
old: &Schema,
new: &Schema,
) -> Result<MigrationPlan, SchemaDiffError>
fn generate_migration_path( &self, old: &Schema, new: &Schema, ) -> Result<MigrationPlan, SchemaDiffError>
Sourcefn validate_changes(
&self,
changes: &[SchemaChange],
) -> Result<ValidationResult, SchemaDiffError>
fn validate_changes( &self, changes: &[SchemaChange], ) -> Result<ValidationResult, SchemaDiffError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".