Skip to main content

TreeItem

Trait TreeItem 

Source
pub trait TreeItem {
    // Required methods
    fn id(&self) -> &str;
    fn display_name(&self) -> &str;
    fn is_expandable(&self) -> bool;

    // Provided method
    fn icon(&self) -> &str { ... }
}
Expand description

Trait for items that can be displayed in a tree structure

Required Methods§

Source

fn id(&self) -> &str

Unique identifier for this item

Source

fn display_name(&self) -> &str

Display name for this item

Source

fn is_expandable(&self) -> bool

Whether this item can have children (is expandable)

Provided Methods§

Source

fn icon(&self) -> &str

Icon to display for this item

Implementors§