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 fn validate_target_fragment(
&self,
fragment: &SchemaFragment,
) -> Result<(), SchemaContractError>
pub fn validate_target_fragment( &self, fragment: &SchemaFragment, ) -> Result<(), SchemaContractError>
Validate a complete authored target fragment against this migration plan.
Uses the proposal’s source-reference, closure and version rules without requiring runtime database identities, stores or an accepted head. This does not qualify the predecessor’s retained data or authorize migration.
§Errors
Returns the proposal contract error for malformed inputs, missing target definitions, version gaps, or invalid rename/transform targets.
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
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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
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
key and return true if they are equal.