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,
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
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> Clone for PatchType<'a, Ns, Tag, Leaf, Att, Val>where
Ns: PartialEq + Clone + Debug + Clone,
Tag: PartialEq + Debug + Clone,
Leaf: PartialEq + Clone + Debug + Clone,
Att: PartialEq + Clone + Debug + Clone,
Val: PartialEq + Clone + Debug + Clone,
impl<'a, Ns, Tag, Leaf, Att, Val> Clone for PatchType<'a, Ns, Tag, Leaf, Att, Val>where Ns: PartialEq + Clone + Debug + Clone, Tag: PartialEq + Debug + Clone, Leaf: PartialEq + Clone + Debug + Clone, Att: PartialEq + Clone + Debug + Clone, Val: PartialEq + Clone + Debug + Clone,
source§impl<'a, Ns, Tag, Leaf, Att, Val> Debug for PatchType<'a, Ns, Tag, Leaf, Att, Val>where
Ns: PartialEq + Clone + Debug + Debug,
Tag: PartialEq + Debug + Debug,
Leaf: PartialEq + Clone + Debug + Debug,
Att: PartialEq + Clone + Debug + Debug,
Val: PartialEq + Clone + Debug + Debug,
impl<'a, Ns, Tag, Leaf, Att, Val> Debug for PatchType<'a, Ns, Tag, Leaf, Att, Val>where Ns: PartialEq + Clone + Debug + Debug, Tag: PartialEq + Debug + Debug, Leaf: PartialEq + Clone + Debug + Debug, Att: PartialEq + Clone + Debug + Debug, Val: PartialEq + Clone + Debug + Debug,
source§impl<'a, Ns, Tag, Leaf, Att, Val> PartialEq<PatchType<'a, Ns, Tag, Leaf, Att, Val>> for PatchType<'a, Ns, Tag, Leaf, Att, Val>where
Ns: PartialEq + Clone + Debug + PartialEq,
Tag: PartialEq + Debug + PartialEq,
Leaf: PartialEq + Clone + Debug + PartialEq,
Att: PartialEq + Clone + Debug + PartialEq,
Val: PartialEq + Clone + Debug + PartialEq,
impl<'a, Ns, Tag, Leaf, Att, Val> PartialEq<PatchType<'a, Ns, Tag, Leaf, Att, Val>> for PatchType<'a, Ns, Tag, Leaf, Att, Val>where Ns: PartialEq + Clone + Debug + PartialEq, Tag: PartialEq + Debug + PartialEq, Leaf: PartialEq + Clone + Debug + PartialEq, Att: PartialEq + Clone + Debug + PartialEq, Val: PartialEq + Clone + Debug + PartialEq,
impl<'a, Ns, Tag, Leaf, Att, Val> StructuralPartialEq for 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,
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>where Att: Sync, Leaf: Sync, Ns: Sync, Tag: Sync, Val: Sync,
impl<'a, Ns, Tag, Leaf, Att, Val> Sync for PatchType<'a, Ns, Tag, Leaf, Att, Val>where Att: Sync, Leaf: Sync, Ns: Sync, Tag: Sync, Val: Sync,
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