pub struct MigrationPlan {
pub from: OperationFormat,
pub to: OperationFormat,
pub steps: Vec<MigrationStep>,
}Expand description
Describes the work needed to move an op log from one canonical
form to another. Built by plan_migration; consumed by
apply_migration.
Fields§
§from: OperationFormat§to: OperationFormat§steps: Vec<MigrationStep>Steps in topological order — every step’s parents have already appeared earlier in the list, so applying in order keeps the partial DAG self-consistent.
Implementations§
Source§impl MigrationPlan
impl MigrationPlan
Sourcepub fn is_no_op(&self) -> bool
pub fn is_no_op(&self) -> bool
true if every step’s old and new op_id agree — applying
the plan would be a no-op. Note that from == to does not
imply this: tests inject custom encoders that produce
different bytes for the same source format, in which case
from == to == V1 but the migration is meaningful.
Trait Implementations§
Source§impl Clone for MigrationPlan
impl Clone for MigrationPlan
Source§fn clone(&self) -> MigrationPlan
fn clone(&self) -> MigrationPlan
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 moreSource§impl Debug for MigrationPlan
impl Debug for MigrationPlan
Source§impl PartialEq for MigrationPlan
impl PartialEq for MigrationPlan
Source§fn eq(&self, other: &MigrationPlan) -> bool
fn eq(&self, other: &MigrationPlan) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for MigrationPlan
impl StructuralPartialEq for MigrationPlan
Auto Trait Implementations§
impl Freeze for MigrationPlan
impl RefUnwindSafe for MigrationPlan
impl Send for MigrationPlan
impl Sync for MigrationPlan
impl Unpin for MigrationPlan
impl UnsafeUnpin for MigrationPlan
impl UnwindSafe for MigrationPlan
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.