pub enum Command {
Replace {
node_id: u32,
new_node: NewNode,
},
Remove {
node_id: u32,
},
InsertBefore {
node_id: u32,
new_node: NewNode,
},
InsertAfter {
node_id: u32,
new_node: NewNode,
},
Wrap {
node_id: u32,
parent_node: NewNode,
},
PrependChild {
node_id: u32,
child_node: NewNode,
},
AppendChild {
node_id: u32,
child_node: NewNode,
},
SetData {
node_id: u32,
key: String,
value: DataValue,
},
}Expand description
A structural mutation command queued during plugin execution. Applied after the plugin finishes (same as JS).
Variants§
Replace
Replace a node with a new subtree
Remove
Remove a node entirely
InsertBefore
Insert a new node before the target
InsertAfter
Insert a new node after the target
Wrap
Wrap a node in a new parent
PrependChild
Prepend a child to a node
AppendChild
Append a child to a node
SetData
Set a scalar field on a node (used for simple property changes)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Command
impl UnwindSafe for Command
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