pub struct TreeConfig {
pub show_types: bool,
pub indent: String,
pub use_unicode: bool,
pub redact_secrets: bool,
pub show_truncation: bool,
pub max_items: Option<usize>,
pub max_depth: Option<usize>,
pub color_choice: ColorChoice,
pub theme: Theme,
}Expand description
Configuration for tree formatting.
Fields§
§show_types: boolShow type names alongside values.
indent: StringIndent string (default: “ “).
use_unicode: boolTree branch characters (Unicode vs ASCII).
redact_secrets: boolRedact secret values.
show_truncation: boolShow truncation information.
max_items: Option<usize>Maximum children items to render per container (None = unlimited).
max_depth: Option<usize>Maximum tree depth to inspect/render (None = unlimited).
color_choice: ColorChoiceColor configuration choice (Auto, Always, Never).
theme: ThemeTheme mapping semantic roles to terminal styles.
Implementations§
Source§impl TreeConfig
impl TreeConfig
Sourcepub fn with_theme(self, theme: Theme) -> Self
pub fn with_theme(self, theme: Theme) -> Self
Builder to configure the theme.
Sourcepub fn with_color_choice(self, choice: ColorChoice) -> Self
pub fn with_color_choice(self, choice: ColorChoice) -> Self
Builder to configure color choice.
Sourcepub fn with_color(self, enabled: bool) -> Self
pub fn with_color(self, enabled: bool) -> Self
Builder to toggle color on or off explicitly.
Sourcepub fn with_max_items(self, max: usize) -> Self
pub fn with_max_items(self, max: usize) -> Self
Builder to set maximum items to display per container.
Sourcepub fn with_max_depth(self, depth: usize) -> Self
pub fn with_max_depth(self, depth: usize) -> Self
Builder to set maximum recursion depth.
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 (const: unstable) · 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 UnsafeUnpin 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