Expand description

Persistent MapTree & related items

Just like Tree, MapTree maintains a hierarchy of nodes. MapTree always has at least one item, the root node. The root node may have children nodes, and those nodes may have children of their own – this goes down as deep as you need!

Every node has exactly one parent, except for the root node, which has no parent.

A node’s children is logically a list – so the order of the children is specified, and you can change it if you want.

In addition to the hierarchy (and unlike Tree), MapTree maintains a mapping of arbitrary keys (which you specify) to nodes. Every node has a key – you can directly retrieve a node if you know its key. If you don’t need this mapping, and would rather have auto-generated IDs, you can use the Tree instead.

Structs

An error that occurs when attempting to remove the root node from a MapTree

An iterator over the children of a node

A node entry in a MapTree

Error: the specified key is already present in the tree

A persistent, indexable, hierarchical data structure that maintains a key-node mapping

A mutable reference to a node in a MapTree

A reference to a node in a MapTree

Enums

Error when adding a sibling node to a MapTree

Error when inserting a node into a MapTree

An error that occurs when attempting to insert a node in an invalid location

Describes a location in a tree

An error that occurs when attempting to move a node to an invalid location