Struct tree_decorator::StandardDecorator [−][src]
pub struct StandardDecorator { /* fields omitted */ }
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.c
Uses 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::last 1 |
---|---|---|
Entry::Simple | ┊- | └ |
Entry::Double | ┊= | ╘ |
Entry::None | ┊ | ╵ |
Style::last
takes precedence here, as explained, so it’ll display asStyle::dashed
was ignored, as expected, since there is no available combination to both of them. ↩
Implementations
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for StandardDecorator
impl Send for StandardDecorator
impl Sync for StandardDecorator
impl Unpin for StandardDecorator
impl UnwindSafe for StandardDecorator