pub struct MigrationSafetyPolicy { /* private fields */ }Expand description
Explicit per-class apply policy.
The verifier’s classification is a floor the policy can only tighten:
destructive and opaque work can be rejected or gated behind approval but
never permanently allowed (a standing Allow is the invalid permanent
force = true shape), and classes the manifest verifier refuses to carry
stay rejected.
Implementations§
Source§impl MigrationSafetyPolicy
impl MigrationSafetyPolicy
Sourcepub fn default_policy() -> Self
pub fn default_policy() -> Self
Return the default policy: verified-safe classes execute, destructive and opaque work requires approval, unresolved work stays rejected.
Sourcepub fn with_decision(
self,
class: SafetyClass,
decision: SafetyPolicyDecision,
) -> Result<Self, Diagnostic>
pub fn with_decision( self, class: SafetyClass, decision: SafetyPolicyDecision, ) -> Result<Self, Diagnostic>
Override one class decision, refusing any loosening of the floor.
Sourcepub fn decision(&self, class: SafetyClass) -> SafetyPolicyDecision
pub fn decision(&self, class: SafetyClass) -> SafetyPolicyDecision
Return the decision for one manifest safety classification.
Trait Implementations§
Source§impl Clone for MigrationSafetyPolicy
impl Clone for MigrationSafetyPolicy
Source§fn clone(&self) -> MigrationSafetyPolicy
fn clone(&self) -> MigrationSafetyPolicy
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 MigrationSafetyPolicy
impl Debug for MigrationSafetyPolicy
impl Eq for MigrationSafetyPolicy
Source§impl PartialEq for MigrationSafetyPolicy
impl PartialEq for MigrationSafetyPolicy
impl StructuralPartialEq for MigrationSafetyPolicy
Auto Trait Implementations§
impl Freeze for MigrationSafetyPolicy
impl RefUnwindSafe for MigrationSafetyPolicy
impl Send for MigrationSafetyPolicy
impl Sync for MigrationSafetyPolicy
impl Unpin for MigrationSafetyPolicy
impl UnsafeUnpin for MigrationSafetyPolicy
impl UnwindSafe for MigrationSafetyPolicy
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