[][src]Struct azul_core::id_tree::Arena

pub struct Arena<T> {
    pub node_hierarchy: NodeHierarchy,
    pub node_data: NodeDataContainer<T>,
}

Fields

node_hierarchy: NodeHierarchynode_data: NodeDataContainer<T>

Implementations

impl<T> Arena<T>[src]

pub fn new() -> Arena<T>[src]

pub fn with_capacity(cap: usize) -> Arena<T>[src]

pub fn new_node(&mut self, data: T) -> NodeId[src]

Create a new node from its associated data.

pub fn len(&self) -> usize[src]

pub fn is_empty(&self) -> bool[src]

pub fn linear_iter(&self) -> LinearIterator[src]

Return an iterator over the indices in the internal arenas Vec

pub fn append_arena(&mut self, other: &mut Arena<T>)[src]

Appends another arena to the end of the current arena (by simply appending the two Vec of nodes) Can potentially mess up internal IDs, only use this if you know what you're doing

pub fn transform<U, F>(&self, closure: F) -> Arena<U> where
    F: Fn(&T, NodeId) -> U, 
[src]

Transform keeps the relative order of parents / children but transforms an Arena into an Arena, by running the closure on each of the items. The NodeId for the root is then valid for the newly created Arena<U>, too.

Trait Implementations

impl<T: Clone> Clone for Arena<T>[src]

impl<T: Debug> Debug for Arena<T>[src]

impl<T: Default> Default for Arena<T>[src]

impl<T: Eq> Eq for Arena<T>[src]

impl<T: Hash> Hash for Arena<T>[src]

impl<T: PartialEq> PartialEq<Arena<T>> for Arena<T>[src]

impl<T> StructuralEq for Arena<T>[src]

impl<T> StructuralPartialEq for Arena<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Arena<T> where
    T: RefUnwindSafe

impl<T> Send for Arena<T> where
    T: Send

impl<T> Sync for Arena<T> where
    T: Sync

impl<T> Unpin for Arena<T> where
    T: Unpin

impl<T> UnwindSafe for Arena<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.