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 compact() -> TreeConfig
pub fn compact() -> TreeConfig
Create a compact configuration.
Sourcepub fn plain() -> TreeConfig
pub fn plain() -> TreeConfig
Create a configuration with ANSI colors strictly disabled.
Sourcepub fn colored() -> TreeConfig
pub fn colored() -> TreeConfig
Create a configuration with ANSI colors explicitly forced on.
Sourcepub fn with_theme(self, theme: Theme) -> TreeConfig
pub fn with_theme(self, theme: Theme) -> TreeConfig
Builder to configure the theme.
Sourcepub fn with_color_choice(self, choice: ColorChoice) -> TreeConfig
pub fn with_color_choice(self, choice: ColorChoice) -> TreeConfig
Builder to configure color choice.
Sourcepub fn with_color(self, enabled: bool) -> TreeConfig
pub fn with_color(self, enabled: bool) -> TreeConfig
Builder to toggle color on or off explicitly.
Sourcepub fn with_max_items(self, max: usize) -> TreeConfig
pub fn with_max_items(self, max: usize) -> TreeConfig
Builder to set maximum items to display per container.
Sourcepub fn with_max_depth(self, depth: usize) -> TreeConfig
pub fn with_max_depth(self, depth: usize) -> TreeConfig
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
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more