pub struct DeletePlan {
pub decision: DeleteDecision,
pub diagnostics: Vec<Diagnostic>,
pub ops: Vec<GraphOp>,
}Expand description
A rules-driven plan for deleting graph elements.
Delete planning is atomic: if any explicitly requested element is missing or not deletable under the effective interaction policy, the plan is rejected and contains no ops. Edges that are removed as a consequence of deleting a node are treated as cascaded consistency edits rather than separate direct edge deletions.
Fields§
§decision: DeleteDecisionDecision.
diagnostics: Vec<Diagnostic>Diagnostics explaining the decision.
ops: Vec<GraphOp>Optional edits to apply if accepted.
Implementations§
Source§impl DeletePlan
impl DeletePlan
pub fn is_accept(&self) -> bool
pub fn is_reject(&self) -> bool
pub fn diagnostics(&self) -> &[Diagnostic]
pub fn ops(&self) -> &[GraphOp]
pub fn into_ops(self) -> Vec<GraphOp>
Sourcepub fn from_ops(ops: impl IntoIterator<Item = GraphOp>) -> Self
pub fn from_ops(ops: impl IntoIterator<Item = GraphOp>) -> Self
Creates an accepted plan with planned delete ops.
Sourcepub fn reject(message: impl Into<String>) -> Self
pub fn reject(message: impl Into<String>) -> Self
Creates a rejected plan with a single graph-level error diagnostic.
pub fn reject_with_diagnostic(diagnostic: Diagnostic) -> Self
pub fn reject_with_diagnostics(diagnostics: Vec<Diagnostic>) -> Self
Trait Implementations§
Source§impl Clone for DeletePlan
impl Clone for DeletePlan
Source§fn clone(&self) -> DeletePlan
fn clone(&self) -> DeletePlan
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 DeletePlan
impl Debug for DeletePlan
Source§impl<'de> Deserialize<'de> for DeletePlan
impl<'de> Deserialize<'de> for DeletePlan
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 DeletePlan
impl RefUnwindSafe for DeletePlan
impl Send for DeletePlan
impl Sync for DeletePlan
impl Unpin for DeletePlan
impl UnsafeUnpin for DeletePlan
impl UnwindSafe for DeletePlan
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