pub struct SchemaMigrationPlanner { /* private fields */ }Expand description
SchemaMigrationPlanner
SchemaMigrationPlanner is the schema-aware derivation boundary above
db::migration.
It validates descriptor identity against known runtime models and emits one
deterministic row-op migration plan for the lower execution engine.
Implementations§
Source§impl SchemaMigrationPlanner
impl SchemaMigrationPlanner
Sourcepub fn new(
entities: Vec<SchemaMigrationEntityTarget>,
) -> Result<Self, InternalError>
pub fn new( entities: Vec<SchemaMigrationEntityTarget>, ) -> Result<Self, InternalError>
Build one planner from canonical schema-evolution entity targets.
Sourcepub fn from_models(
models: &[&'static EntityModel],
) -> Result<Self, InternalError>
pub fn from_models( models: &[&'static EntityModel], ) -> Result<Self, InternalError>
Build one planner directly from runtime entity models.
Sourcepub fn plan(
&self,
descriptor: &SchemaMigrationDescriptor,
) -> Result<MigrationPlan, InternalError>
pub fn plan( &self, descriptor: &SchemaMigrationDescriptor, ) -> Result<MigrationPlan, InternalError>
Derive one deterministic low-level migration plan from a descriptor.
Trait Implementations§
Source§impl Clone for SchemaMigrationPlanner
impl Clone for SchemaMigrationPlanner
Source§fn clone(&self) -> SchemaMigrationPlanner
fn clone(&self) -> SchemaMigrationPlanner
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 moreAuto Trait Implementations§
impl Freeze for SchemaMigrationPlanner
impl RefUnwindSafe for SchemaMigrationPlanner
impl Send for SchemaMigrationPlanner
impl Sync for SchemaMigrationPlanner
impl Unpin for SchemaMigrationPlanner
impl UnsafeUnpin for SchemaMigrationPlanner
impl UnwindSafe for SchemaMigrationPlanner
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