Struct synctree::node_arena::NodeArena [−][src]
pub struct NodeArena<T> { /* fields omitted */ }
A reference-counted Arena of tree nodes.
You are free to clone it as much as you want.
Methods
impl<T> NodeArena<T>
[src]
impl<T> NodeArena<T>
pub fn new() -> NodeArena<T>
[src]
pub fn new() -> NodeArena<T>
Creates a new, empty NodeArena
.
pub fn with_capacity(capacity: usize) -> NodeArena<T>
[src]
pub fn with_capacity(capacity: usize) -> NodeArena<T>
Creates a new NodeArena
with specified capacity.
pub fn into_inner(self) -> Arena<NodeEntry<T>>
[src]
pub fn into_inner(self) -> Arena<NodeEntry<T>>
Consumes the NodeArena
, returning the inner Arena.
Panics
Panics if the NodeArena
has more than one strong reference.
pub fn ptr_eq(&self, other: &NodeArena<T>) -> bool
[src]
pub fn ptr_eq(&self, other: &NodeArena<T>) -> bool
Returns true if the NodeArena
points to the same inner arena as the other one.
pub fn read<'a>(
&'a self
) -> impl Deref<Target = Arena<NodeEntry<T>>> + 'a
[src]
pub fn read<'a>(
&'a self
) -> impl Deref<Target = Arena<NodeEntry<T>>> + 'a
Returns a handle to inner Arena.
pub fn write<'a>(
&'a self
) -> impl DerefMut<Target = Arena<NodeEntry<T>>> + 'a
[src]
pub fn write<'a>(
&'a self
) -> impl DerefMut<Target = Arena<NodeEntry<T>>> + 'a
Returns a mutable handle to inner Arena.
Trait Implementations
impl<T: Debug> Debug for NodeArena<T>
[src]
impl<T: Debug> Debug for NodeArena<T>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<T> Clone for NodeArena<T>
[src]
impl<T> Clone for NodeArena<T>