Skip to main content

replace_node_in_tree

Function replace_node_in_tree 

Source
pub fn replace_node_in_tree(
    root: &Node,
    target: &NodeId,
    replacement: &Node,
) -> Option<Node>
Expand description

Replace a node by ID in a tree, returning a new tree with the replacement. Returns None if the target was not found.