/// Clears all leaves from a tree and reinstantiates the tree's structure.
Clears all leaves from a tree and reinstantiates the tree's structure.
Clears all leaves from a tree and reinstantiates the tree ' s structure .
fn reset(&mut self) -> Result<(), HashTreeError> {
        // Resetting a tree should be as simple as dropping the reference to
        // the root node, which will cause it and its subtree to be cleaned up.
        self.root = Node::new(
            self.label_gen.root(),
            self.children_per_node,
            self.height - 1,
            &self.label_gen,
        )?;
        Ok(())
    }
fn reset ( & mut self ) -> Result < ( ) , HashTreeError > { // Resetting a tree should be as simple as dropping the reference to // the root node, which will cause it and its subtree to be cleaned up. self . root = Node :: new ( self . label_gen . root ( ) , self . children_per_node , self . height - 1 , & self . label_gen , ) ? ; Ok ( ( ) ) }
Clears all leaves from a tree and reinstantiates the tree's structure.
Clears all leaves from a tree and reinstantiates the tree ' s structure .
&mut self