Trait lang_util::node::NodeContentDisplay[][src]

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; }

Trait for displaying an AST node’s content

Required methods

fn name() -> Option<&'static str>[src]

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.

fn display_extra(&self, f: &mut Formatter<'_>) -> Result[src]

Display extra information for the node

Parameters

  • f: formatter to output to

fn display_children(&self, level: usize, f: &mut Formatter<'_>) -> Result[src]

Display the node’s children

Parameters

  • level: current indentation level
  • f: formatter to output to
Loading content...

Implementations on Foreign Types

impl NodeContentDisplay for SmolStr[src]

impl NodeContentDisplay for String[src]

impl NodeContentDisplay for f32[src]

impl NodeContentDisplay for f64[src]

impl NodeContentDisplay for i32[src]

impl NodeContentDisplay for u16[src]

impl NodeContentDisplay for u32[src]

impl NodeContentDisplay for bool[src]

impl<T: NodeDisplay> NodeContentDisplay for Box<T>[src]

impl<T: NodeDisplay> NodeContentDisplay for Option<T>[src]

impl<T: NodeDisplay> NodeContentDisplay for Vec<T>[src]

Loading content...

Implementors

Loading content...