Skip to main content

DisplayTreeNode

Trait DisplayTreeNode 

Source
pub trait DisplayTreeNode: Sized {
    // Required methods
    fn tree_children(&self) -> &[Self];
    fn tree_child_name(&self, index: usize) -> ChildName;
    fn fmt_tree_node(&self, f: &mut Formatter<'_>) -> Result;
}
Expand description

A node of an expression tree that DisplayTreeExpr can render.

Required Methods§

Source

fn tree_children(&self) -> &[Self]

The children of this node, in argument order.

Source

fn tree_child_name(&self, index: usize) -> ChildName

The display name of the child at index.

Source

fn fmt_tree_node(&self, f: &mut Formatter<'_>) -> Result

Write this node’s own label.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§