Struct mt_dom::patch::ReplaceNode [−][src]
pub struct ReplaceNode<'a, NS, TAG, ATT, VAL, EVENT> where
NS: PartialEq + Clone + Debug,
TAG: PartialEq + Clone + Debug,
ATT: PartialEq + Clone + Debug,
VAL: PartialEq + Clone + Debug,
EVENT: PartialEq + Clone + Debug, { pub tag: Option<&'a TAG>, pub node_idx: NodeIdx, pub new_node_idx: NodeIdx, pub replacement: &'a Node<NS, TAG, ATT, VAL, EVENT>, }
Expand description
Replace a node with another node. This typically happens when a node’s tag changes. ex:
becomes
Fields
tag: Option<&'a TAG>
the tag of the node we are going to replace can replace text node, and text node doesn’t have tags
node_idx: NodeIdx
the index of the node we are going to replace
new_node_idx: NodeIdx
the node_idx of the replacement
replacement: &'a Node<NS, TAG, ATT, VAL, EVENT>
the node that will replace the target node
Implementations
Trait Implementations
Performs the conversion.
impl<'a, NS: PartialEq, TAG: PartialEq, ATT: PartialEq, VAL: PartialEq, EVENT: PartialEq> PartialEq<ReplaceNode<'a, NS, TAG, ATT, VAL, EVENT>> for ReplaceNode<'a, NS, TAG, ATT, VAL, EVENT> where
NS: PartialEq + Clone + Debug,
TAG: PartialEq + Clone + Debug,
ATT: PartialEq + Clone + Debug,
VAL: PartialEq + Clone + Debug,
EVENT: PartialEq + Clone + Debug,
impl<'a, NS: PartialEq, TAG: PartialEq, ATT: PartialEq, VAL: PartialEq, EVENT: PartialEq> PartialEq<ReplaceNode<'a, NS, TAG, ATT, VAL, EVENT>> for ReplaceNode<'a, NS, TAG, ATT, VAL, EVENT> where
NS: PartialEq + Clone + Debug,
TAG: PartialEq + Clone + Debug,
ATT: PartialEq + Clone + Debug,
VAL: PartialEq + Clone + Debug,
EVENT: PartialEq + Clone + Debug,
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl<'a, NS, TAG, ATT, VAL, EVENT> RefUnwindSafe for ReplaceNode<'a, NS, TAG, ATT, VAL, EVENT> where
ATT: RefUnwindSafe,
EVENT: RefUnwindSafe,
NS: RefUnwindSafe,
TAG: RefUnwindSafe,
VAL: RefUnwindSafe,
impl<'a, NS, TAG, ATT, VAL, EVENT> Send for ReplaceNode<'a, NS, TAG, ATT, VAL, EVENT> where
ATT: Sync,
EVENT: Sync,
NS: Sync,
TAG: Sync,
VAL: Sync,
impl<'a, NS, TAG, ATT, VAL, EVENT> Sync for ReplaceNode<'a, NS, TAG, ATT, VAL, EVENT> where
ATT: Sync,
EVENT: Sync,
NS: Sync,
TAG: Sync,
VAL: Sync,
impl<'a, NS, TAG, ATT, VAL, EVENT> Unpin for ReplaceNode<'a, NS, TAG, ATT, VAL, EVENT>
impl<'a, NS, TAG, ATT, VAL, EVENT> UnwindSafe for ReplaceNode<'a, NS, TAG, ATT, VAL, EVENT> where
ATT: RefUnwindSafe,
EVENT: RefUnwindSafe,
NS: RefUnwindSafe,
TAG: RefUnwindSafe,
VAL: RefUnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more