Struct TestSymbols

Source
pub struct TestSymbols;
Expand description

A set of symbols where every symbol is either whitespace ( ) or an empty string.

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

Source§

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

Used by the debug impl for &dyn Symbols.
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. .

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.