pub fn write_tree_iterative<W: Write>(
out: &mut W,
tree: &BTreeMap<String, Box<Tree>>,
initial_depth: usize,
) -> Result<()>Expand description
Writes the tree with indentation based on depth (ITERATIVE VERSION)
An explicit stack of iterators, one per open level, replaces the call stack: the same pre-order
as write_tree, but the depth of the tree costs heap, not call stack.
ยงArguments
out- Where the lines gotree- The tree to writeinitial_depth- Depth level of the first line for indentation