pub struct SchemaMigrationDraft { /* private fields */ }Expand description
Trusted authoring input containing only context-free schema steps.
This type deliberately has no serialization implementation. Persisted bytes
can only be produced after replay by build_verified_manifest.
Implementations§
Source§impl SchemaMigrationDraft
impl SchemaMigrationDraft
Sourcepub fn new<S>(
id: MigrationId,
parents: Vec<MigrationId>,
steps: Vec<S>,
) -> Result<Self, Diagnostic>where
S: Into<MigrationStep>,
pub fn new<S>(
id: MigrationId,
parents: Vec<MigrationId>,
steps: Vec<S>,
) -> Result<Self, Diagnostic>where
S: Into<MigrationStep>,
Construct a draft, canonicalizing its set-like parent order.
Sourcepub fn legacy_bridge(
id: MigrationId,
legacy_parents: Vec<LegacyMigrationReference>,
legacy_applied_set: LegacyAppliedSetDigest,
) -> Result<Self, Diagnostic>
pub fn legacy_bridge( id: MigrationId, legacy_parents: Vec<LegacyMigrationReference>, legacy_applied_set: LegacyAppliedSetDigest, ) -> Result<Self, Diagnostic>
Construct the zero-operation legacy-frontier bridge draft.
The bridge is the only manifest that names legacy parents; it carries no steps and no canonical parents, so its verified source and target are the identical reconstructed legacy head.
Sourcepub const fn id(&self) -> &MigrationId
pub const fn id(&self) -> &MigrationId
Return the compound migration identity.
Sourcepub fn parents(&self) -> &[MigrationId]
pub fn parents(&self) -> &[MigrationId]
Return canonical-sorted parent identities.
Sourcepub fn steps(&self) -> &[MigrationStep]
pub fn steps(&self) -> &[MigrationStep]
Return ordered trusted schema steps.
Sourcepub fn legacy_parents(&self) -> &[LegacyMigrationReference]
pub fn legacy_parents(&self) -> &[LegacyMigrationReference]
Return canonical-sorted legacy frontier references (bridge only).
Sourcepub const fn legacy_applied_set(&self) -> Option<&LegacyAppliedSetDigest>
pub const fn legacy_applied_set(&self) -> Option<&LegacyAppliedSetDigest>
Return the complete released applied-set digest (bridge only).
Trait Implementations§
Source§impl Clone for SchemaMigrationDraft
impl Clone for SchemaMigrationDraft
Source§fn clone(&self) -> SchemaMigrationDraft
fn clone(&self) -> SchemaMigrationDraft
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 SchemaMigrationDraft
impl Debug for SchemaMigrationDraft
impl Eq for SchemaMigrationDraft
Source§impl PartialEq for SchemaMigrationDraft
impl PartialEq for SchemaMigrationDraft
impl StructuralPartialEq for SchemaMigrationDraft
Auto Trait Implementations§
impl Freeze for SchemaMigrationDraft
impl RefUnwindSafe for SchemaMigrationDraft
impl Send for SchemaMigrationDraft
impl Sync for SchemaMigrationDraft
impl Unpin for SchemaMigrationDraft
impl UnsafeUnpin for SchemaMigrationDraft
impl UnwindSafe for SchemaMigrationDraft
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