Function traverse

Source
pub fn traverse<F>(nodes: Vec<Node>, callable: F) -> Vec<Node>
where F: for<'r> FnMut(&'r Node) -> Option<Node>,
Expand description

Traverses the given nodes node tree and returns an updated tree based on callable. The callable must return a Node if you wish to either replace the node or update it, and return None if you wish to remove it.