Trait Symbols

Source
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§

Source

fn horizontal_bar(&self) -> &'static str

The horizontal bar symbol used to draw horizontal tree branches, e.g. .

Source

fn vertical_bar(&self) -> &'static str

The vertical bar symbol used to draw the tree trunks of the tree and its subtrees, e.g. .

Source

fn right_branch(&self) -> &'static str

A piece of trunk with a branch to the right, e.g. .

Source

fn indent(&self) -> &'static str

A single indentation symbol, e.g. .

Source

fn left_upper_corner(&self) -> &'static str

The symbol for left upper corners, e.g. .

Source

fn left_bottom_corner(&self) -> &'static str

The symbol for left bottom corners, e.g. .

Source

fn right_upper_corner(&self) -> &'static str

The symbol for right upper corners, e.g. .

Source

fn right_bottom_corner(&self) -> &'static str

The symbol for right bottom corners, e.g. .

Source

fn missing_items_symbol(&self) -> &'static str

The symbol to display when a list of items is empty, e.g. .

Source

fn item_list_symbol(&self) -> &'static str

The symbol to display when a list of items is non-empty, e.g. .

Provided Methods§

Source

fn description(&self) -> &'static str

Used by the debug impl for &dyn Symbols.

Trait Implementations§

Source§

impl<'s> Debug for &'s dyn Symbols

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Implementors§