Struct tuix_internal::state::Tree [−][src]
pub struct Tree {
pub parent: Vec<Option<Entity>, Global>,
pub first_child: Vec<Option<Entity>, Global>,
pub next_sibling: Vec<Option<Entity>, Global>,
pub prev_sibling: Vec<Option<Entity>, Global>,
pub changed: bool,
}
Expand description
The tree describes a tree of entities
Fields
parent: Vec<Option<Entity>, Global>
first_child: Vec<Option<Entity>, Global>
next_sibling: Vec<Option<Entity>, Global>
prev_sibling: Vec<Option<Entity>, Global>
changed: bool
Implementations
Returns the last child of an entity
Returns the nth child of an entity
Returns the number of children of an entity
Returns the parent of an entity
Returns the first child of an entity or None
if there isn’t one
Returns the next sibling of an entity or None
if there isn’t one
Returns the previous sibling of an entity or None
if there isn’t one
Returns true if the entity is the first child of its parent
Returns true if the entity has children
Removes an entity from the tree
This method assumes that a check if the entity is alive has already been done prior to calling this method
Trait Implementations
A type representing an iterator that walks down the visual tree
A type respresenting an iterator that walks up the visual tree
type ChildIter = ChildIterator<'a>
type ChildIter = ChildIterator<'a>
A type representing an iterator which iterates through the children of a specified node
Returns an iterator which walks down the hierarchy
Returns an iterator which walks up the hierarchy
pub fn child_iter(
&'a self,
node: <Tree as Hierarchy<'a>>::Item
) -> <Tree as Hierarchy<'a>>::ChildIter
pub fn child_iter(
&'a self,
node: <Tree as Hierarchy<'a>>::Item
) -> <Tree as Hierarchy<'a>>::ChildIter
Returns an iterator over the child nodes of a specified node
Returns true if the specified node is the first child of its parent
Returns true if the specified node is the last child of its parent
type IntoIter = TreeIterator<'a>
type IntoIter = TreeIterator<'a>
Which kind of iterator are we turning this into?
Auto Trait Implementations
impl RefUnwindSafe for Tree
impl UnwindSafe for Tree
Blanket Implementations
Mutably borrows from an owned value. Read more