pub trait Symbols {
// Required methods
fn horizontal_bar(&self) -> &'static str;
fn vertical_bar(&self) -> &'static str;
fn right_branch(&self) -> &'static str;
fn indent(&self) -> &'static str;
fn left_upper_corner(&self) -> &'static str;
fn left_bottom_corner(&self) -> &'static str;
fn right_upper_corner(&self) -> &'static str;
fn right_bottom_corner(&self) -> &'static str;
fn missing_items_symbol(&self) -> &'static str;
fn item_list_symbol(&self) -> &'static str;
// Provided method
fn description(&self) -> &'static str { ... }
}
Expand description
A trait for supplying symbols to the AST formatting functions.
Required Methods§
Sourcefn horizontal_bar(&self) -> &'static str
fn horizontal_bar(&self) -> &'static str
The horizontal bar symbol used to draw horizontal tree branches, e.g. ─
.
Sourcefn vertical_bar(&self) -> &'static str
fn vertical_bar(&self) -> &'static str
The vertical bar symbol used to draw the tree trunks of the tree and its subtrees, e.g. │
.
Sourcefn right_branch(&self) -> &'static str
fn right_branch(&self) -> &'static str
A piece of trunk with a branch to the right, e.g. ├
.
Sourcefn left_upper_corner(&self) -> &'static str
fn left_upper_corner(&self) -> &'static str
The symbol for left upper corners, e.g. ╭
.
Sourcefn left_bottom_corner(&self) -> &'static str
fn left_bottom_corner(&self) -> &'static str
The symbol for left bottom corners, e.g. ╰
.
Sourcefn right_upper_corner(&self) -> &'static str
fn right_upper_corner(&self) -> &'static str
The symbol for right upper corners, e.g. ╮
.
Sourcefn right_bottom_corner(&self) -> &'static str
fn right_bottom_corner(&self) -> &'static str
The symbol for right bottom corners, e.g. ╯
.
Sourcefn missing_items_symbol(&self) -> &'static str
fn missing_items_symbol(&self) -> &'static str
The symbol to display when a list of items is empty, e.g. ✕
.
Sourcefn item_list_symbol(&self) -> &'static str
fn item_list_symbol(&self) -> &'static str
The symbol to display when a list of items is non-empty, e.g. ↓
.
Provided Methods§
Sourcefn description(&self) -> &'static str
fn description(&self) -> &'static str
Used by the debug impl for &dyn Symbols
.