pub struct TreeFormatting {
pub prefix_str: Option<String>,
pub orientation: TreeOrientation,
pub anchor: AnchorPosition,
pub chars: FormatCharacters,
}
Expand description
This structure collects together all the formatting options that control how the tree is output.
Fields§
§prefix_str: Option<String>
A prefix string written before every line. While no validation is performed on this value, if newline (or other formatting) characters are included the tree is likely to appear disjointed.
orientation: TreeOrientation
The orientation to write the tree.
anchor: AnchorPosition
The line anchor position.
chars: FormatCharacters
The set of characters to use when line formatting.
Implementations§
Source§impl TreeFormatting
impl TreeFormatting
Sourcepub fn dir_tree(chars: FormatCharacters) -> Self
pub fn dir_tree(chars: FormatCharacters) -> Self
Construct the common options for a directory tree using the provided format characters.
Sourcepub fn dir_tree_with_prefix(chars: FormatCharacters, prefix_str: String) -> Self
pub fn dir_tree_with_prefix(chars: FormatCharacters, prefix_str: String) -> Self
Construct the common options for a directory tree using the provided format characters.
Additionally, the value for prefix_str
will be used for each output line.
Sourcepub fn dir_tree_left(chars: FormatCharacters) -> Self
pub fn dir_tree_left(chars: FormatCharacters) -> Self
Construct the common options for a directory tree, with lines anchored to the left, using the provided format characters.
Sourcepub fn dir_tree_left_with_prefix(
chars: FormatCharacters,
prefix_str: String,
) -> Self
pub fn dir_tree_left_with_prefix( chars: FormatCharacters, prefix_str: String, ) -> Self
Construct the common options for a directory tree, with lines anchored to the left, using
the provided format characters. Additionally, the value for prefix_str
will be used for
each output line.
Trait Implementations§
Source§impl Clone for TreeFormatting
impl Clone for TreeFormatting
Source§fn clone(&self) -> TreeFormatting
fn clone(&self) -> TreeFormatting
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more