Struct synctree::Node[][src]

pub struct Node<T> { /* fields omitted */ }

A reference to the tree node.

It has an Id, and the reference-counted data.

Most of the functions will block until there are no more writers, holding the RwLock. There may be more than one reader to the data, though.

Methods

impl<T> Node<T>
[src]

Creates a new node in the provided arena.

Returns a handle, dereferencing to the node data.

This function will block until there are no more writers.

Returns a mutable handle, dereferencing to the node data.

This function will block until there are no more writers and readers.

Returns node's parent, if any.

Returns node's first child, if any.

Returns node's last child, if any.

Returns node's next sibling, if any.

Returns node's previous sibling, if any.

Important traits for Children<'a, T>

Returns an iterator over node's children.

Important traits for Ancestors<'a, T>

Returns an iterator over node's ancestors.

Important traits for Siblings<'a, T>

Returns an iterator over node's ancestors, including itself.

Important traits for DFTraverse<'a, T>

Returns an iterator over node's descendants, including itself, in NLR depth-first order.

Detachs a node from it's parent.

If node does not have a parent, does nothing.

Appends a new child to node, e.g. after the existing children.

If the parent node did not have any children before, this operation is the same as prepend.

Prepends a new child to node, e.g. before the existing children.

If the parent node did not have any children before, this operation is the same as append.

Returns true, if a node points to the same data as the other one.

Trait Implementations

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

Formats the value using the given formatter. Read more

impl<T> Clone for Node<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<T> Send for Node<T> where
    T: Send + Sync

impl<T> Sync for Node<T> where
    T: Send + Sync