pub enum PatchType<'a, Ns, Tag, Leaf, Att, Val>where
Ns: PartialEq + Clone + Debug,
Tag: PartialEq + Debug,
Leaf: PartialEq + Clone + Debug,
Att: PartialEq + Clone + Debug,
Val: PartialEq + Clone + Debug,{
InsertBeforeNode {
nodes: Vec<&'a Node<Ns, Tag, Leaf, Att, Val>>,
},
InsertAfterNode {
nodes: Vec<&'a Node<Ns, Tag, Leaf, Att, Val>>,
},
AppendChildren {
children: Vec<&'a Node<Ns, Tag, Leaf, Att, Val>>,
},
RemoveNode,
MoveBeforeNode {
nodes_path: Vec<TreePath>,
},
MoveAfterNode {
nodes_path: Vec<TreePath>,
},
ReplaceNode {
replacement: Vec<&'a Node<Ns, Tag, Leaf, Att, Val>>,
},
AddAttributes {
attrs: Vec<&'a Attribute<Ns, Att, Val>>,
},
RemoveAttributes {
attrs: Vec<&'a Attribute<Ns, Att, Val>>,
},
}
Expand description
the patch variant
Variants§
InsertBeforeNode
insert the nodes before the node at patch_path
InsertAfterNode
insert the nodes after the node at patch_path
AppendChildren
Fields
Append a vector of child nodes to a parent node id at patch_path
RemoveNode
remove the target node
MoveBeforeNode
remove the nodes pointed at these nodes_path
and move them before target_element
pointed at patch_path
MoveAfterNode
remove the the nodes pointed at these nodes_path
and move them after the target_element
pointed at patch_path
ReplaceNode
Fields
ReplaceNode a node with another node. This typically happens when a node’s tag changes. ex:
becomes
AddAttributes
Add attributes that the new node has that the old node does not Note: the attributes is not a reference since attributes of same name are merged to produce a new unify attribute
RemoveAttributes
Fields
Remove attributes that the old node had that the new node doesn’t
Trait Implementations§
source§impl<'a, Ns, Tag, Leaf, Att, Val> PartialEq for PatchType<'a, Ns, Tag, Leaf, Att, Val>
impl<'a, Ns, Tag, Leaf, Att, Val> PartialEq for PatchType<'a, Ns, Tag, Leaf, Att, Val>
impl<'a, Ns, Tag, Leaf, Att, Val> StructuralPartialEq for PatchType<'a, Ns, Tag, Leaf, Att, Val>
Auto Trait Implementations§
impl<'a, Ns, Tag, Leaf, Att, Val> RefUnwindSafe for PatchType<'a, Ns, Tag, Leaf, Att, Val>where
Att: RefUnwindSafe,
Leaf: RefUnwindSafe,
Ns: RefUnwindSafe,
Tag: RefUnwindSafe,
Val: RefUnwindSafe,
impl<'a, Ns, Tag, Leaf, Att, Val> Send for PatchType<'a, Ns, Tag, Leaf, Att, Val>
impl<'a, Ns, Tag, Leaf, Att, Val> Sync for PatchType<'a, Ns, Tag, Leaf, Att, Val>
impl<'a, Ns, Tag, Leaf, Att, Val> Unpin for PatchType<'a, Ns, Tag, Leaf, Att, Val>
impl<'a, Ns, Tag, Leaf, Att, Val> UnwindSafe for PatchType<'a, Ns, Tag, Leaf, Att, Val>where
Att: RefUnwindSafe,
Leaf: RefUnwindSafe,
Ns: RefUnwindSafe,
Tag: RefUnwindSafe,
Val: RefUnwindSafe,
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