pub enum MigrationStep {
Rename {
from: String,
to: String,
},
Default {
path: String,
value: Value,
},
Drop {
path: String,
},
}Expand description
One step of a payload migration.
A closed set, not an expression language. Three steps covered every incompatible edit the Studio domain model produced in three days, and a closed set is what lets every path be a checked literal and every value a bound parameter.
Variants§
Rename
Move a value to another path, if the source is present. An absent source is a no-op: a migration fills gaps, it does not invent values.
Default
Set path when nothing is there. A present value is left alone —
otherwise a “default” would be an overwrite.
Drop
Remove path if present.
Implementations§
Trait Implementations§
Source§impl Clone for MigrationStep
impl Clone for MigrationStep
Source§impl Debug for MigrationStep
impl Debug for MigrationStep
Source§impl PartialEq for MigrationStep
impl PartialEq for MigrationStep
impl StructuralPartialEq for MigrationStep
Auto 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