pub struct AANode<T>(_);

Implementations

Insert a new node with content into the tree. If a node with this value already exist, nothing will be inserted, and false will be returned.

Insert a new node with content into the tree. If a node with this value already exists, it will be replaced and the old content returned.

Remove a value from this tree. If the value was found, it will be returned.

Traverse the tree looking for a specific value. The callback is called as follows:

  1. While going down, with (content, None) as the input. The callback may return either Left or Right to continue the traversal, or Value to stop the traversal, for example because a value was found.
  2. While going back up, with (content, Some(res)), where res is the result from the fully traversed subgraph. The callback must produce a Value result, a traversal (returning Left or Right) is a logic error and will be ignored.

Create a new Nil node.

Return true if this node is Nil.

Return true if this node is a leaf.

Return true if this node has a left child.

Return true if this node has a right child.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Converts to this type from the input type.

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

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Converts to this type from the input type.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.