pub trait NodeContentDisplay {
    fn name() -> Option<&'static str>;
    fn display_extra(&self, f: &mut Formatter<'_>) -> Result;
    fn display_children(&self, level: usize, f: &mut Formatter<'_>) -> Result;
}
Expand description

Trait for displaying an AST node’s content

Required Methods

Name of the node

Returns

None if this node is just a transparent wrapper (and should not be displayed), otherwise the name of the node type.

Display extra information for the node

Parameters
  • f: formatter to output to

Display the node’s children

Parameters
  • level: current indentation level
  • f: formatter to output to

Implementations on Foreign Types

Implementors