pub struct SchemaMigrationPlan { /* private fields */ }Expand description
One canonical database-scoped coordinated migration plan.
Implementations§
Source§impl SchemaMigrationPlan
impl SchemaMigrationPlan
Sourcepub fn try_new(
transitions: Vec<EntityMigration>,
) -> Result<SchemaMigrationPlan, SchemaContractError>
pub fn try_new( transitions: Vec<EntityMigration>, ) -> Result<SchemaMigrationPlan, SchemaContractError>
Construct, canonicalize, bound, and digest one coordinated plan.
§Errors
Returns a typed migration or encoded-size error for an empty, duplicate, ambiguous, or oversized plan.
Sourcepub const fn program_version(&self) -> u16
pub const fn program_version(&self) -> u16
Return the closed migration-program version.
Sourcepub fn transitions(&self) -> &[EntityMigration]
pub fn transitions(&self) -> &[EntityMigration]
Borrow canonical entity transitions.
Sourcepub const fn digest(&self) -> SchemaMigrationPlanDigest
pub const fn digest(&self) -> SchemaMigrationPlanDigest
Return the exact canonical plan digest.
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 (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 SchemaMigrationPlan
impl Debug for SchemaMigrationPlan
impl Eq for SchemaMigrationPlan
Source§impl PartialEq for SchemaMigrationPlan
impl PartialEq for SchemaMigrationPlan
impl StructuralPartialEq for SchemaMigrationPlan
Auto 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
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.