pub struct SchemaMigrationPlan {
pub changes: Vec<SchemaChange>,
pub steps: Vec<SchemaMigrationStep>,
pub has_breaking_changes: bool,
pub breaking_count: usize,
pub warning_count: usize,
pub info_count: usize,
}Expand description
The full migration plan produced by compute_migration.
Fields§
§changes: Vec<SchemaChange>All detected changes between old and new schema.
steps: Vec<SchemaMigrationStep>Ordered list of steps to apply to reach the new schema.
has_breaking_changes: booltrue when at least one change is breaking.
breaking_count: usizeCount of breaking changes.
warning_count: usizeCount of warning-level changes.
info_count: usizeCount of info-level changes.
Implementations§
Source§impl SchemaMigrationPlan
impl SchemaMigrationPlan
Sourcepub fn num_changes(&self) -> usize
pub fn num_changes(&self) -> usize
Total number of detected changes.
Sourcepub fn breaking_changes(&self) -> Vec<&SchemaChange>
pub fn breaking_changes(&self) -> Vec<&SchemaChange>
Returns references to all breaking changes.
Sourcepub fn format_report(&self) -> String
pub fn format_report(&self) -> String
Produces a multi-line human-readable summary report.
Sourcepub fn format_steps(&self) -> String
pub fn format_steps(&self) -> String
Produces a multi-line list of migration steps.
Trait Implementations§
Source§impl Clone for SchemaMigrationPlan
impl Clone for SchemaMigrationPlan
Source§fn clone(&self) -> SchemaMigrationPlan
fn clone(&self) -> SchemaMigrationPlan
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SchemaMigrationPlan
impl RefUnwindSafe for SchemaMigrationPlan
impl Send for SchemaMigrationPlan
impl Sync for SchemaMigrationPlan
impl Unpin for SchemaMigrationPlan
impl UnsafeUnpin for SchemaMigrationPlan
impl UnwindSafe for SchemaMigrationPlan
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