pub struct SchemaMigrationDescriptor { /* private fields */ }Expand description
SchemaMigrationDescriptor
SchemaMigrationDescriptor is the schema-evolution authority for one high-level migration. It names the migration, freezes the monotonic version, records human-facing description text, and carries validated schema/data intent for planning.
Implementations§
Source§impl SchemaMigrationDescriptor
impl SchemaMigrationDescriptor
Sourcepub fn new(
migration_id: EntityName,
version: u64,
description: impl Into<String>,
intent: SchemaMigrationStepIntent,
data_transformation: Option<SchemaDataTransformation>,
) -> Result<Self, InternalError>
pub fn new( migration_id: EntityName, version: u64, description: impl Into<String>, intent: SchemaMigrationStepIntent, data_transformation: Option<SchemaDataTransformation>, ) -> Result<Self, InternalError>
Build one validated schema migration descriptor.
Sourcepub const fn migration_id(&self) -> EntityName
pub const fn migration_id(&self) -> EntityName
Return the canonical migration identity.
Sourcepub const fn description(&self) -> &str
pub const fn description(&self) -> &str
Borrow the descriptor description.
Sourcepub const fn intent(&self) -> &SchemaMigrationStepIntent
pub const fn intent(&self) -> &SchemaMigrationStepIntent
Borrow the high-level schema change intent.
Sourcepub const fn data_transformation(&self) -> Option<&SchemaDataTransformation>
pub const fn data_transformation(&self) -> Option<&SchemaDataTransformation>
Borrow the optional data transformation.
Trait Implementations§
Source§impl Clone for SchemaMigrationDescriptor
impl Clone for SchemaMigrationDescriptor
Source§fn clone(&self) -> SchemaMigrationDescriptor
fn clone(&self) -> SchemaMigrationDescriptor
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 SchemaMigrationDescriptor
impl RefUnwindSafe for SchemaMigrationDescriptor
impl Send for SchemaMigrationDescriptor
impl Sync for SchemaMigrationDescriptor
impl Unpin for SchemaMigrationDescriptor
impl UnsafeUnpin for SchemaMigrationDescriptor
impl UnwindSafe for SchemaMigrationDescriptor
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