Struct cursive::menu::Tree [−][src]
Expand description
Root of a menu tree.
Fields
children: Vec<Item, Global>
Menu items
Implementations
Inserts a delimiter at the given position.
Adds a delimiter to the end of this tree.
Adds a actionnable leaf to the end of this tree.
Inserts a leaf at the given position.
Adds a actionnable leaf to the end of this tree - chainable variant.
Inserts a subtree at the given position.
Adds a submenu to the end of this tree.
Adds a submenu to the end of this tree - chainable variant.
Looks for the child at the given position.
Returns None
if i >= self.len()
.
Returns the item at the given position.
Returns None
if i > self.len()
or if the item is not a subtree.
Looks for a child with the given label.
Returns None
if no such label was found.
Looks for a subtree with the given label.
Returns the position of a child with the given label.
Returns None
if no such label was found.
Returns the number of direct children in this node.
- Includes delimiters.
- Does not count nested children.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Tree
impl !UnwindSafe for Tree
Blanket Implementations
Mutably borrows from an owned value. Read more
Calls the given closure and return the result. Read more
Calls the given closure on self
.