Struct mt_dom::patch::ReplaceNode[][src]

pub struct ReplaceNode<'a, NS, TAG, ATT, VAL, EVENT, MSG> {
    pub tag: Option<&'a TAG>,
    pub node_idx: NodeIdx,
    pub new_node_idx: NodeIdx,
    pub replacement: &'a Node<NS, TAG, ATT, VAL, EVENT, MSG>,
}
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, MSG>

the node that will replace the target node

Implementations

create a new ReplaceNode patch

Trait Implementations

Formats the value using the given formatter. Read more

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.