pub struct MigrationStep {
pub from: SchemaVersion,
pub to: SchemaVersion,
pub description: String,
pub changes: Vec<FieldChange>,
}Expand description
A single migration step between adjacent versions.
Fields§
§from: SchemaVersionVersion this step migrates from.
to: SchemaVersionVersion this step migrates to.
description: StringHuman-readable description of the migration.
changes: Vec<FieldChange>Field changes applied by this step.
Implementations§
Source§impl MigrationStep
impl MigrationStep
Sourcepub fn new(
from: SchemaVersion,
to: SchemaVersion,
description: impl Into<String>,
) -> Self
pub fn new( from: SchemaVersion, to: SchemaVersion, description: impl Into<String>, ) -> Self
Create a new migration step.
Sourcepub fn add_change(&mut self, change: FieldChange)
pub fn add_change(&mut self, change: FieldChange)
Add a field change to this step.
Trait Implementations§
Source§impl Clone for MigrationStep
impl Clone for MigrationStep
Source§fn clone(&self) -> MigrationStep
fn clone(&self) -> MigrationStep
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MigrationStep
impl RefUnwindSafe for MigrationStep
impl Send for MigrationStep
impl Sync for MigrationStep
impl Unpin for MigrationStep
impl UnsafeUnpin for MigrationStep
impl UnwindSafe for MigrationStep
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