pub struct TreeConfig {
pub show_branches: bool,
pub show_root: bool,
pub indent_size: usize,
pub max_depth: Option<usize>,
pub column_separator: String,
pub min_column_width: usize,
}Expand description
Formatter parameters for tree output
Defines customizable parameters for tree rendering including branch symbols, indentation, depth limits, and column formatting.
Fields§
§show_branches: boolShow branch symbols (├──, └──, │)
show_root: boolShow root node name
indent_size: usizeNumber of spaces per indentation level
max_depth: Option<usize>Maximum depth to display (None = unlimited)
column_separator: StringColumn separator for aligned format (default: “ “)
min_column_width: usizeMinimum column width for aligned format (default: 0)
Implementations§
Source§impl TreeConfig
impl TreeConfig
Sourcepub fn show_branches(self, show: bool) -> Self
pub fn show_branches(self, show: bool) -> Self
Set whether to show branch symbols
Sourcepub fn indent_size(self, size: usize) -> Self
pub fn indent_size(self, size: usize) -> Self
Set indentation size in spaces
Sourcepub fn column_separator(self, separator: String) -> Self
pub fn column_separator(self, separator: String) -> Self
Set column separator for aligned format
Sourcepub fn min_column_width(self, width: usize) -> Self
pub fn min_column_width(self, width: usize) -> Self
Set minimum column width for aligned format
Trait Implementations§
Source§impl Clone for TreeConfig
impl Clone for TreeConfig
Source§fn clone(&self) -> TreeConfig
fn clone(&self) -> TreeConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TreeConfig
impl Debug for TreeConfig
Auto Trait Implementations§
impl Freeze for TreeConfig
impl RefUnwindSafe for TreeConfig
impl Send for TreeConfig
impl Sync for TreeConfig
impl Unpin for TreeConfig
impl UnwindSafe for TreeConfig
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