Trait rosary::tree_format::TreeFormat [−][src]
A trait which allows implementers to specify how they should be printed as a tree.
Required methods
fn treeify(&self) -> RoseTree<String>
[src]
The only thing you need to define is the conversion from your type to a RoseTree.
Provided methods
fn indent(&self) -> RoseTree<String>
[src]
Indent adds the decorations to the strings of the tree with the default formatter.
fn fmt_tree(&self) -> String
[src]
Actually converts the tree into a single string for printing.
Trait Implementations
Implementors
impl<T: Display> TreeFormat for RoseTree<T>
[src]
If you’re a RoseTree, you get TreeFormat for free so long as T can be printed. If printing T involves printing newlines, don’t. It’ll get weird.