Struct tap::tree::Tree

source · []
pub struct Tree {
    pub root_id: TreeNodeId,
    /* private fields */
}
Expand description

One of the main structure of TAP. Tt contain nodes, that contain attribute with value of different type. New nodes are generally created by the different parser, then nodes and attributes contained in the tree can be accessed via various method.

Fields

root_id: TreeNodeId

Implementations

Create the tree and the root node.

Return the underlying tree arena.

Create a new node in the tree and return corresponding id.

Add a node via it’s node_id as child of the parent_id node.

Create a new TreeNodeId for node, add it as child of parent_id and return the new node id

Return node id of the parent of the node.

Return the children of the provided NodeId as a Vector of NodeId.

Return the children of the provided NodeId as a Vector of Node.

Return children from a node root path recusively as a Vec<TreeNodeId>.

Return the name of the children for node_id.

Check if node as children.

Return different info for all children of a node.

Return a path from a node id.

Return a node from a node id.

Remove node and descendants from the tree.

Return a node from a path.

Search recursively for nodes matching path, starting from the root from_id.

Return a node id from node path.

Return number of nodes in the tree.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

Formats the value using the given formatter. Read more

Serialize this value into the given Serde serializer. Read more

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

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

Converts the given value to a String. 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.