pub struct OperationPlan { /* private fields */ }Expand description
Immutable authorization-relevant operation plan.
Implementations§
Source§impl OperationPlan
impl OperationPlan
Sourcepub fn new(
operation_id: OperationId,
operation: OperationName,
target: TargetRef,
risk: RiskClass,
reversibility: Reversibility,
) -> Result<Self, PlanError>
pub fn new( operation_id: OperationId, operation: OperationName, target: TargetRef, risk: RiskClass, reversibility: Reversibility, ) -> Result<Self, PlanError>
Creates an empty plan and computes its first fingerprint.
Sourcepub fn with_topology_revision(
self,
revision: impl Into<String>,
) -> Result<Self, PlanError>
pub fn with_topology_revision( self, revision: impl Into<String>, ) -> Result<Self, PlanError>
Binds the plan to a topology revision.
Sourcepub fn with_change(self, change: PlannedChange) -> Result<Self, PlanError>
pub fn with_change(self, change: PlannedChange) -> Result<Self, PlanError>
Adds a planned change.
Sourcepub fn with_prerequisite(
self,
prerequisite: impl Into<String>,
) -> Result<Self, PlanError>
pub fn with_prerequisite( self, prerequisite: impl Into<String>, ) -> Result<Self, PlanError>
Adds a prerequisite description.
Sourcepub fn with_conflict(
self,
conflict: impl Into<String>,
) -> Result<Self, PlanError>
pub fn with_conflict( self, conflict: impl Into<String>, ) -> Result<Self, PlanError>
Adds a conflict description.
Sourcepub fn with_step(self, step: PlanStep) -> Result<Self, PlanError>
pub fn with_step(self, step: PlanStep) -> Result<Self, PlanError>
Adds an ordered execution step.
Sourcepub fn with_verification(
self,
verification: VerificationStrategy,
) -> Result<Self, PlanError>
pub fn with_verification( self, verification: VerificationStrategy, ) -> Result<Self, PlanError>
Sets the verification strategy.
Sourcepub fn with_rollback_guidance(
self,
guidance: impl Into<String>,
) -> Result<Self, PlanError>
pub fn with_rollback_guidance( self, guidance: impl Into<String>, ) -> Result<Self, PlanError>
Sets rollback or recovery guidance.
Sourcepub fn refresh_fingerprint(&mut self) -> Result<(), PlanError>
pub fn refresh_fingerprint(&mut self) -> Result<(), PlanError>
Recomputes and validates the deterministic fingerprint.
Sourcepub fn validate_fingerprint(&self) -> Result<(), PlanError>
pub fn validate_fingerprint(&self) -> Result<(), PlanError>
Verifies that serialized plan material still matches its fingerprint.
Sourcepub fn operation_id(&self) -> &OperationId
pub fn operation_id(&self) -> &OperationId
Returns the operation identity.
Sourcepub fn operation(&self) -> &OperationName
pub fn operation(&self) -> &OperationName
Returns the canonical operation name.
Sourcepub fn topology_revision(&self) -> Option<&str>
pub fn topology_revision(&self) -> Option<&str>
Returns the topology revision when present.
Sourcepub fn changes(&self) -> &[PlannedChange]
pub fn changes(&self) -> &[PlannedChange]
Returns planned resource changes.
Sourcepub fn verification(&self) -> Option<&VerificationStrategy>
pub fn verification(&self) -> Option<&VerificationStrategy>
Returns the verification strategy when present.
Sourcepub fn fingerprint(&self) -> &PlanFingerprint
pub fn fingerprint(&self) -> &PlanFingerprint
Returns the authorization-relevant plan fingerprint.
Trait Implementations§
Source§impl Clone for OperationPlan
impl Clone for OperationPlan
Source§fn clone(&self) -> OperationPlan
fn clone(&self) -> OperationPlan
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 OperationPlan
impl Debug for OperationPlan
Source§impl<'de> Deserialize<'de> for OperationPlan
impl<'de> Deserialize<'de> for OperationPlan
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for OperationPlan
impl JsonSchema for OperationPlan
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for OperationPlan
impl PartialEq for OperationPlan
Source§fn eq(&self, other: &OperationPlan) -> bool
fn eq(&self, other: &OperationPlan) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for OperationPlan
impl Serialize for OperationPlan
impl Eq for OperationPlan
impl StructuralPartialEq for OperationPlan
Auto Trait Implementations§
impl Freeze for OperationPlan
impl RefUnwindSafe for OperationPlan
impl Send for OperationPlan
impl Sync for OperationPlan
impl Unpin for OperationPlan
impl UnsafeUnpin for OperationPlan
impl UnwindSafe for OperationPlan
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.