pub trait NodeContentDisplay {
// Required methods
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§
Sourcefn name() -> Option<&'static str>
fn name() -> Option<&'static str>
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.
Sourcefn display_extra(&self, f: &mut Formatter<'_>) -> Result
fn display_extra(&self, f: &mut Formatter<'_>) -> Result
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.