Skip to content

struct

TreeRow

pub struct TreeRow {
    pub key: String,
    pub path: String,
    pub label: String,
    pub icon: String,
    pub level: usize,
    pub has_children: bool,
    pub expanded: bool,
    pub parent: Option<usize>,
}

One visible row of a Tree: its key and path, label and icon, depth, whether it has children and is expanded, and its parent row.

Fields

key

pub key: String

The item's key: its indexes from the root, joined with / (0/2).

path

pub path: String

Labels from the root to this item, joined with /.

label

pub label: String

The text shown.

icon

pub icon: String

An icon name, or "".

level

pub level: usize

Depth, from 1 at the root.

has_children

pub has_children: bool

Whether the item has children.

expanded

pub expanded: bool

Whether its children are shown.

parent

pub parent: Option<usize>

The parent's row index, for items below the root.

Trait implementations