pub struct EntityMigration { /* private fields */ }Expand description
One immediate-predecessor transition for a current entity declaration.
Implementations§
Source§impl EntityMigration
impl EntityMigration
Sourcepub fn try_new(
entity: EntitySourceKey,
from: DeclaredEntityVersion,
from_name: Option<EntitySourceKey>,
renames: Vec<SchemaMigrationRename>,
transforms: Vec<SchemaMigrationTransform>,
) -> Result<EntityMigration, SchemaContractError>
pub fn try_new( entity: EntitySourceKey, from: DeclaredEntityVersion, from_name: Option<EntitySourceKey>, renames: Vec<SchemaMigrationRename>, transforms: Vec<SchemaMigrationTransform>, ) -> Result<EntityMigration, SchemaContractError>
Construct and canonicalize one entity transition.
§Errors
Returns a typed migration error for an empty transition, a no-op entity rename, duplicate rename ownership, duplicate transform target, or invalid transform.
Sourcepub const fn entity(&self) -> &EntitySourceKey
pub const fn entity(&self) -> &EntitySourceKey
Borrow the current target entity key.
Sourcepub const fn from(&self) -> DeclaredEntityVersion
pub const fn from(&self) -> DeclaredEntityVersion
Return the accepted-before declared entity version.
Sourcepub const fn from_name(&self) -> Option<&EntitySourceKey>
pub const fn from_name(&self) -> Option<&EntitySourceKey>
Borrow an optional accepted-before entity name.
Sourcepub fn renames(&self) -> &[SchemaMigrationRename]
pub fn renames(&self) -> &[SchemaMigrationRename]
Borrow canonical rename operations.
Sourcepub fn transforms(&self) -> &[SchemaMigrationTransform]
pub fn transforms(&self) -> &[SchemaMigrationTransform]
Borrow canonical historical transforms.
Trait Implementations§
Source§impl Clone for EntityMigration
impl Clone for EntityMigration
Source§fn clone(&self) -> EntityMigration
fn clone(&self) -> EntityMigration
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 EntityMigration
impl Debug for EntityMigration
impl Eq for EntityMigration
Source§impl PartialEq for EntityMigration
impl PartialEq for EntityMigration
impl StructuralPartialEq for EntityMigration
Auto Trait Implementations§
impl Freeze for EntityMigration
impl RefUnwindSafe for EntityMigration
impl Send for EntityMigration
impl Sync for EntityMigration
impl Unpin for EntityMigration
impl UnsafeUnpin for EntityMigration
impl UnwindSafe for EntityMigration
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.