Struct lz_diet::DietNode [] [src]

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

Methods

impl<T> DietNode<T>
[src]

Trait Implementations

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

Formats the value using the given formatter.

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

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

Get a reference to the left subtree

Get a reference to the right subtree

Returns the value of the current node.

Walk down the tree

impl<T> NodeMut for DietNode<T>
[src]

Try to detach the left sub-tree

Try to detach the right sub-tree

Replace the left subtree with tree and return the old one.

Replace the right subtree with tree and return the old one.

Returns a mutable reference to the value of the current node.

Consume a Node and return its parts: (value, left, right)

Returns a mutable reference to the left child

Returns a mutable reference to the right child

Try to rotate the tree left if right subtree exists

Try to rotate the tree right if left subtree exists

Simple mutable walk Read more

Walks down the tree by detaching subtrees, then up reattaching them back. step_in should guide the path taken, stop will be called on the node where either step_in returned Stop or it was not possible to proceed. Then step_out will be called for each node along the way to root, except the final one (that for which stop was called). Read more

Insert new_node in-order before self. step_out will be invoked for all nodes in path from (excluding) the point of insertion, to (including) self, unless self is the point of insertion. Read more

Extract out a node. This can be used in conjuction with try_remove to remove any node except the root. Read more

Replace this node with one of its descendant, returns None if it has no children. Read more