Struct indextree::Arena
[−]
[src]
pub struct Arena<T> { /* fields omitted */ }
An Arena
structure containing certain Nodes
Methods
impl<T> Arena<T>
[src]
pub fn new() -> Arena<T>
[src]
Create a new empty Arena
pub fn new_node(&mut self, data: T) -> NodeId
[src]
Create a new node from its associated data.
pub fn count(&self) -> usize
[src]
pub fn is_empty(&self) -> bool
[src]
pub fn get(&self, id: NodeId) -> Option<&Node<T>>
[src]
Get a reference to the node with the given id if in the arena, None otherwise.
pub fn get_mut(&mut self, id: NodeId) -> Option<&mut Node<T>>
[src]
Get a mutable reference to the node with the given id if in the arena, None otherwise.
pub fn iter(&self) -> Iter<Node<T>>
[src]
Iterate over all nodes in the arena in storage-order.
Trait Implementations
impl<T: PartialEq> PartialEq for Arena<T>
[src]
fn eq(&self, __arg_0: &Arena<T>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Arena<T>) -> bool
[src]
This method tests for !=
.
impl<T: Clone> Clone for Arena<T>
[src]
fn clone(&self) -> Arena<T>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T: Debug> Debug for Arena<T>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<T> Index<NodeId> for Arena<T>
[src]
type Output = Node<T>
The returned type after indexing.
fn index(&self, node: NodeId) -> &Node<T>
[src]
Performs the indexing (container[index]
) operation.