[−][src]Struct orbtk::prelude::api::Tree
Base data structure to manage the entity entities of a window in a tree based structure.
Fields
root: Entity
children: BTreeMap<Entity, Vec<Entity>>
parent: BTreeMap<Entity, Option<Entity>>
Methods
impl Tree
[src]
pub fn new() -> Tree
[src]
Creates a new tree with default values.
pub fn start_node(&self, start_node: impl Into<Entity>) -> &Tree
[src]
pub fn register_node(&mut self, entity: impl Into<Entity>)
[src]
Registers a new entity entity
as node.
pub fn set_root(&mut self, root: impl Into<Entity>)
[src]
Sets the root.
pub fn append_child(
&mut self,
parent: impl Into<Entity>,
child: impl Into<Entity>
) -> Result<Entity, NotFound>
[src]
&mut self,
parent: impl Into<Entity>,
child: impl Into<Entity>
) -> Result<Entity, NotFound>
Appends a child
entity to the given parent
entity.
Raised NotFound
error if the parent is not part of the tree.
pub fn len(&self) -> usize
[src]
Returns the number of all entities in the tree.
pub fn is_empty(&self) -> bool
[src]
Returns true if the tree has no entities.
Trait Implementations
impl System<Tree, StringComponentStore> for InitSystem
[src]
fn run(&self, ecm: &mut EntityComponentManager<Tree, StringComponentStore>)
[src]
impl System<Tree, StringComponentStore> for EventStateSystem
[src]
fn run(&self, ecm: &mut EntityComponentManager<Tree, StringComponentStore>)
[src]
impl System<Tree, StringComponentStore> for PostLayoutStateSystem
[src]
fn run(&self, ecm: &mut EntityComponentManager<Tree, StringComponentStore>)
[src]
impl System<Tree, StringComponentStore> for RenderSystem
[src]
fn run(&self, ecm: &mut EntityComponentManager<Tree, StringComponentStore>)
[src]
impl System<Tree, StringComponentStore> for LayoutSystem
[src]
fn run(&self, ecm: &mut EntityComponentManager<Tree, StringComponentStore>)
[src]
impl EntityStore for Tree
[src]
fn register_entity(&mut self, entity: impl Into<Entity>)
[src]
fn remove_entity(&mut self, entity: impl Into<Entity>)
[src]
impl Debug for Tree
[src]
impl Default for Tree
[src]
impl<'a> IntoIterator for &'a Tree
[src]
type Item = Entity
The type of the elements being iterated over.
type IntoIter = TreeIterator<'a>
Which kind of iterator are we turning this into?
fn into_iter(self) -> <&'a Tree as IntoIterator>::IntoIter
[src]
impl Clone for Tree
[src]
Auto Trait Implementations
impl Send for Tree
impl !Sync for Tree
impl Unpin for Tree
impl UnwindSafe for Tree
impl !RefUnwindSafe for Tree
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<E> Component for E where
E: Any,
[src]
E: Any,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,