pub struct MigrationApplyApproval { /* private fields */ }Expand description
A one-time operator approval bound to one exact verified transition.
Every element the plan executes under is captured: any change to the manifest bytes, ordered steps, profiles, or the source/target managed states breaks the binding and the approval no longer matches.
Implementations§
Source§impl MigrationApplyApproval
impl MigrationApplyApproval
Sourcepub fn for_manifest(
manifest: &VerifiedSchemaMigrationManifest,
) -> Result<Self, Diagnostic>
pub fn for_manifest( manifest: &VerifiedSchemaMigrationManifest, ) -> Result<Self, Diagnostic>
Record an approval for the exact transition a verified manifest claims.
Sourcepub fn for_rollback(
manifest: &VerifiedSchemaMigrationManifest,
rollback_safety: SafetyClass,
) -> Result<Self, Diagnostic>
pub fn for_rollback( manifest: &VerifiedSchemaMigrationManifest, rollback_safety: SafetyClass, ) -> Result<Self, Diagnostic>
Record an approval for rolling one verified manifest back.
The approval binds the executed transition, so the manifest’s states enter swapped: rolling back moves the managed schema from the manifest’s target back to its source. A forward approval therefore never authorizes a rollback, and vice versa.
Sourcepub const fn id(&self) -> &MigrationId
pub const fn id(&self) -> &MigrationId
Return the approved compound migration identity.
Sourcepub const fn safety(&self) -> SafetyClass
pub const fn safety(&self) -> SafetyClass
Return the approved safety classification.
Sourcepub fn binds(
&self,
manifest: &VerifiedSchemaMigrationManifest,
) -> Result<bool, Diagnostic>
pub fn binds( &self, manifest: &VerifiedSchemaMigrationManifest, ) -> Result<bool, Diagnostic>
Return whether this approval binds the exact forward transition.
Sourcepub fn binds_rollback(
&self,
manifest: &VerifiedSchemaMigrationManifest,
rollback_safety: SafetyClass,
) -> Result<bool, Diagnostic>
pub fn binds_rollback( &self, manifest: &VerifiedSchemaMigrationManifest, rollback_safety: SafetyClass, ) -> Result<bool, Diagnostic>
Return whether this approval binds the exact rollback transition.
Trait Implementations§
Source§impl Clone for MigrationApplyApproval
impl Clone for MigrationApplyApproval
Source§fn clone(&self) -> MigrationApplyApproval
fn clone(&self) -> MigrationApplyApproval
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more