Crate print_flat_tree [−] [src]
Converts a flat tree
to a string.
Usage
⚠Be careful when using this code, it's not being tested!
extern crate print_flat_tree; use print_flat_tree::fmt; let tree = vec!(0, 1, 2, 3, 7, 8, 9, 10); print!("{}", fmt(tree));
Which outputs:
0──┐
1──┐
2──┘ │
3──┐
│
│
│
7
8──┐
9
10──┘
As can be seen from the above diagram 7
is the parent of 3
, and 3
is
the parent of 1
etc.
See Also
Functions
fmt |
Converts a |