pub struct Tree {
pub label: String,
pub style: Style,
pub guide_style: Style,
pub expanded: bool,
pub highlight: bool,
pub hide_root: bool,
pub children: Vec<Tree>,
}Expand description
A renderable for a tree structure.
Fields§
§label: StringThe label for this node.
style: StyleStyle for this node’s label.
guide_style: StyleStyle for the guide lines.
expanded: boolIf true, children are visible.
highlight: boolIf true, highlight string labels.
hide_root: boolIf true, don’t show the root node.
children: Vec<Tree>Children of this node.
Implementations§
Trait Implementations§
Source§impl Renderable for Tree
impl Renderable for Tree
Source§fn render(&self, options: &ConsoleOptions) -> RenderResult
fn render(&self, options: &ConsoleOptions) -> RenderResult
Render this object into a
RenderResult using the provided options. Read moreSource§fn measure(&self, _options: &ConsoleOptions) -> Option<Measurement>
fn measure(&self, _options: &ConsoleOptions) -> Option<Measurement>
Optional width-measurement hook (equivalent to
__rich_measure__).
Override to provide min/max width constraints for layout.Auto Trait Implementations§
impl Freeze for Tree
impl RefUnwindSafe for Tree
impl Send for Tree
impl Sync for Tree
impl Unpin for Tree
impl UnsafeUnpin for Tree
impl UnwindSafe for Tree
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more