pub fn write_tree<W: Write>(
out: &mut W,
tree: &BTreeMap<String, Box<Tree>>,
depth: usize,
) -> Result<()>Expand description
Writes the tree with indentation based on depth (RECURSIVE VERSION)
Pre-order: a node, then its subtree, then its next sibling. The writer makes the traversal
testable and measurable without a console: a Vec<u8> in tests, std::io::sink() in benchmarks.
ยงArguments
out- Where the lines gotree- The tree to writedepth- Current depth level for indentation