pub struct SchemaDeltaStep { /* private fields */ }Expand description
One trusted schema-only migration step.
Implementations§
Source§impl SchemaDeltaStep
impl SchemaDeltaStep
Sourcepub fn new(
id: MigrationStepId,
delta: SchemaDelta,
reverse: Option<SchemaDelta>,
) -> Result<Self, Diagnostic>
pub fn new( id: MigrationStepId, delta: SchemaDelta, reverse: Option<SchemaDelta>, ) -> Result<Self, Diagnostic>
Construct a schema step and derive every context-free contract field.
Sourcepub const fn kind(&self) -> MigrationStepKind
pub const fn kind(&self) -> MigrationStepKind
Return the fixed schema-delta step kind.
Sourcepub const fn contract(&self) -> &SchemaDeltaStepContract
pub const fn contract(&self) -> &SchemaDeltaStepContract
Return the derived step contract.
Sourcepub const fn delta(&self) -> &SchemaDelta
pub const fn delta(&self) -> &SchemaDelta
Return the trusted schema delta.
Sourcepub fn canonical_bytes(&self) -> Result<Vec<u8>, Diagnostic>
pub fn canonical_bytes(&self) -> Result<Vec<u8>, Diagnostic>
Return exact canonical step bytes.
Trait Implementations§
Source§impl Clone for SchemaDeltaStep
impl Clone for SchemaDeltaStep
Source§fn clone(&self) -> SchemaDeltaStep
fn clone(&self) -> SchemaDeltaStep
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 SchemaDeltaStep
impl Debug for SchemaDeltaStep
impl Eq for SchemaDeltaStep
Source§impl From<SchemaDeltaStep> for MigrationStep
impl From<SchemaDeltaStep> for MigrationStep
Source§fn from(step: SchemaDeltaStep) -> Self
fn from(step: SchemaDeltaStep) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SchemaDeltaStep
impl PartialEq for SchemaDeltaStep
Source§impl Serialize for SchemaDeltaStep
impl Serialize for SchemaDeltaStep
impl StructuralPartialEq for SchemaDeltaStep
Auto Trait Implementations§
impl Freeze for SchemaDeltaStep
impl RefUnwindSafe for SchemaDeltaStep
impl Send for SchemaDeltaStep
impl Sync for SchemaDeltaStep
impl Unpin for SchemaDeltaStep
impl UnsafeUnpin for SchemaDeltaStep
impl UnwindSafe for SchemaDeltaStep
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