pub struct CharSet {
pub horizontal: char,
pub vertical: char,
pub connector: char,
pub end_connector: char,
}Expand description
A set of chars used for formatting a type that implements
DisplayTree.
These are the characters that make up the text that connects the nodes of the tree.
CharSet provides a few built-in sets via associated constants, but you
can construct your own if needed.
§Examples
let char_set = display_tree::CharSet {
horizontal: '─',
vertical: '│',
connector: '├',
end_connector: '└',
};Fields§
§horizontal: charThe characters used in the horizontal portion of a branch.
Should resemble a plain horizontal line, eg. ‘─’.
vertical: charThe character used in the space between branches in place of
connector.
Should resemble a plain vertical line, eg. ‘│’.
connector: charThe character connecting the vertical and horizontal portions of a branch.
Should resemble a vertical line with an offshoot on the right, eg. ‘├’.
end_connector: charThe character connecting the vertical and horizontal portions of the last branch under a node.
Should resemble an “L” shape, eg. ‘└’.
Implementations§
Source§impl CharSet
impl CharSet
Sourcepub const SINGLE_LINE: Self
pub const SINGLE_LINE: Self
Regular Unicode box-drawing characters.
Sourcepub const SINGLE_LINE_BOLD: Self
pub const SINGLE_LINE_BOLD: Self
Bold Unicode box-drawing characters.
Sourcepub const SINGLE_LINE_CURVED: Self
pub const SINGLE_LINE_CURVED: Self
Curved Unicode box-drawing characters.
Sourcepub const DOUBLE_LINE: Self
pub const DOUBLE_LINE: Self
Double Unicode box-drawing characters.