pub struct StandardDecorator { /* private fields */ }Expand description
Default decorator implementation.
§Style
Root
├ Item A
│ Description
┊- Small Description
└ Item B
├ Item B.a
├ Item B.b
│ └ Item B.b.a
└ Item B.cUses a block length of 3 by default, but can be modified.
§Block Level 0
At root item, nothing is rendered.
§Block Level 1 or Greater
Every following section describes a style item available to use at styles section (at
tree_item!).
§Precedence
Some of them will takes precedence of others, such as Last and Dashed,
meaning that, when both are opt-in together, it’ll use one which has the
most precedence as guide to choose suitable item.
§No Effect Combination
Also, there are combinations which has no effect, such as Last and Dashed,
as well, they will have no effect by lack of proper character representation or
the combination simply does’t makes sense.
When it occurs, it’ll effectively ignore the least preceding style.
§Items
§Last
No effect: Style::dashed
Takes precedence over: Style::dashed
| Entry Kind | Style::last | Style::dashed |
|---|---|---|
Entry::Simple | └ | └ |
Entry::Double | ╘ | ╘ |
Entry::None | ╵ | ╵ |
§Dashed
No effect: Style::last
| Entry Kind | Style::dashed | Style::last1 |
|---|---|---|
Entry::Simple | ┊- | └ |
Entry::Double | ┊= | ╘ |
Entry::None | ┊ | ╵ |
Style::lasttakes precedence here, as explained, so it’ll display asStyle::dashedwas ignored, as expected, since there is no available combination to both of them. ↩