Trait DisplayableNode

Source
pub trait DisplayableNode: Sized {
    // Required methods
    fn label(&self) -> Option<String>;
    fn children(&self) -> Vec<&Self>;

    // Provided method
    fn display(&self) -> String { ... }
}
Expand description

simple trait to provide an easy way to display hierarchy trees

Required Methods§

Source

fn label(&self) -> Option<String>

Source

fn children(&self) -> Vec<&Self>

Provided Methods§

Source

fn display(&self) -> String

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.

Implementors§