pub struct DefaultSymbols;
Expand description
The default set of symbols that produces neatly-drawn trees.
§Example
StmtKind::Var
╰─declarations=↓
╰─Var
├─name: "x"
├─kind: Let
├─initializer: ExprKind::Binary
│ ├─op: Add
│ ├─left: Lit
│ │ ├─token: "1"
│ │ ╰─value: LitValue::Integer(1)
│ ╰─right: Lit
│ ├─token: "2.3"
│ ╰─value: LitValue::Float(2.3)
╰─n_uses: 0
StmtKind::Print
╰─value: ExprKind::Comma
╰─operands=↓
├─Lit
│ ├─token: "\"hello, world!\""
│ ╰─value: LitValue::Str("hello, world!")
╰─ExprKind::Variable
╰─name: "x"
Trait Implementations§
Source§impl Symbols for DefaultSymbols
impl Symbols for DefaultSymbols
Source§fn description(&self) -> &'static str
fn description(&self) -> &'static str
Used by the debug impl for
&dyn Symbols
.Source§fn horizontal_bar(&self) -> &'static str
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
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
fn right_branch(&self) -> &'static str
A piece of trunk with a branch to the right, e.g.
├
.Source§fn left_upper_corner(&self) -> &'static str
fn left_upper_corner(&self) -> &'static str
The symbol for left upper corners, e.g.
╭
.Source§fn left_bottom_corner(&self) -> &'static str
fn left_bottom_corner(&self) -> &'static str
The symbol for left bottom corners, e.g.
╰
.Source§fn right_upper_corner(&self) -> &'static str
fn right_upper_corner(&self) -> &'static str
The symbol for right upper corners, e.g.
╮
.Source§fn right_bottom_corner(&self) -> &'static str
fn right_bottom_corner(&self) -> &'static str
The symbol for right bottom corners, e.g.
╯
.Source§fn 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.
✕
.Source§fn 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.
↓
.Auto Trait Implementations§
impl Freeze for DefaultSymbols
impl RefUnwindSafe for DefaultSymbols
impl Send for DefaultSymbols
impl Sync for DefaultSymbols
impl Unpin for DefaultSymbols
impl UnwindSafe for DefaultSymbols
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more