pub struct Plan {
pub from: u32,
pub to: u32,
pub baseline_missing: bool,
pub changes: Vec<Change>,
pub text: String,
}Expand description
The result of planning a migration: the text to write, and what it would do.
Fields§
§from: u32The version the file says it was written with.
to: u32The version this build writes.
baseline_missing: boolTrue when there was no baseline, so only additions and renames could be decided.
changes: Vec<Change>§text: StringThe whole file as it would be written. Equal to the input when nothing changes.
Implementations§
Source§impl Plan
impl Plan
Sourcepub fn is_current(&self) -> bool
pub fn is_current(&self) -> bool
Whether writing this plan would change the file: nothing to add, nothing to move, and the
stamp is already this build’s. A Kept row is not a change — it is the record of a value
that was looked at and left alone.
Sourcepub fn notable(&self) -> Vec<&Change>
pub fn notable(&self) -> Vec<&Change>
The changes that touch a value the operator might care about, in the order a reader wants.
pub fn kept(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl Forget for Plan
impl Freeze for Plan
impl Move for Plan
impl RefUnwindSafe for Plan
impl Send for Planwhere
RawVecInner: Send,
impl Sync for Planwhere
RawVecInner: Sync,
impl Unpin for Plan
impl UnsafeUnpin for Planwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<Change>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
impl UnwindSafe for Planwhere
RawVecInner: UnwindSafe,
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