#[non_exhaustive]pub enum EditCommand {
AddRuleSet {
path: String,
},
RemoveRuleSet {
id: NodeId,
},
AddRule {
parent: NodeId,
rule: RulePayload,
},
UpdateRule {
id: NodeId,
rule: RulePayload,
},
DeleteRule {
id: NodeId,
},
MoveRule {
id: NodeId,
new_index: usize,
},
UpdateRespond {
id: NodeId,
respond: RespondPayload,
},
UpdateRootSetting {
key: RootSettingKey,
value: EditValue,
},
}Expand description
Structured edit command applied via Workspace::apply.
§Shape comes straight from spec §4.3
Each variant targets a node by NodeId (never by positional index). This guarantees edits remain well-defined across previous inserts / removes in the same GUI session.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
AddRuleSet
Add a rule set file to the workspace.
path is relative to the root config’s directory — the same
convention as the value stored in service.rule_sets.
RemoveRuleSet
Remove a rule set by its NodeId. The underlying TOML file is NOT deleted from disk — the workspace only removes the reference.
AddRule
Add a rule to an existing rule set.
UpdateRule
Update a rule’s when / respond block.
DeleteRule
Remove a rule by NodeId.
MoveRule
Reorder a rule within its parent rule set.
UpdateRespond
Update the respond block of a rule.
UpdateRootSetting
Update a root-level setting (listener, log, service-level flags).
Trait Implementations§
Source§impl Clone for EditCommand
impl Clone for EditCommand
Source§fn clone(&self) -> EditCommand
fn clone(&self) -> EditCommand
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for EditCommand
impl RefUnwindSafe for EditCommand
impl Send for EditCommand
impl Sync for EditCommand
impl Unpin for EditCommand
impl UnsafeUnpin for EditCommand
impl UnwindSafe for EditCommand
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