pub struct SubtractionPlanV1 {
pub plan_id: String,
pub operation: SubtractionOperation,
pub target_ids: Vec<String>,
pub preserved_invariants: Vec<InvariantBudgetV1>,
pub dry_run: bool,
}Expand description
A plan for a subtractive operation. Declares what will be removed and what invariants must be preserved.
Fields§
§plan_id: StringPlan identifier.
operation: SubtractionOperationOperation type.
target_ids: Vec<String>Target artifact IDs to subtract from.
preserved_invariants: Vec<InvariantBudgetV1>Invariants that must be preserved.
dry_run: boolWhether this is a dry-run (no actual mutation).
Implementations§
Source§impl SubtractionPlanV1
impl SubtractionPlanV1
Sourcepub fn new(operation: SubtractionOperation, target_ids: Vec<String>) -> Self
pub fn new(operation: SubtractionOperation, target_ids: Vec<String>) -> Self
Create a new subtraction plan.
Sourcepub fn with_invariant(self, budget: InvariantBudgetV1) -> Self
pub fn with_invariant(self, budget: InvariantBudgetV1) -> Self
Add an invariant budget.
Sourcepub fn can_proceed(&self) -> bool
pub fn can_proceed(&self) -> bool
Check if the plan can proceed (no budgets exceeded).
Trait Implementations§
Source§impl Clone for SubtractionPlanV1
impl Clone for SubtractionPlanV1
Source§fn clone(&self) -> SubtractionPlanV1
fn clone(&self) -> SubtractionPlanV1
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 SubtractionPlanV1
impl Debug for SubtractionPlanV1
Source§impl<'de> Deserialize<'de> for SubtractionPlanV1
impl<'de> Deserialize<'de> for SubtractionPlanV1
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
Auto Trait Implementations§
impl Freeze for SubtractionPlanV1
impl RefUnwindSafe for SubtractionPlanV1
impl Send for SubtractionPlanV1
impl Sync for SubtractionPlanV1
impl Unpin for SubtractionPlanV1
impl UnsafeUnpin for SubtractionPlanV1
impl UnwindSafe for SubtractionPlanV1
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