Struct tref::TreeNode[][src]

pub struct TreeNode<T: NodeContent> {
    pub content: T,
    pub level: u32,
    pub parent_position: Option<u32>,
    pub parent_children_pos: Option<u32>,
    pub children: Vec<u32>,
}
Expand description

Struct that contains a tree node.

Fields

content: T

Node content.

level: u32

Nodel level.

parent_position: Option<u32>

Parent node index in the tree array.

parent_children_pos: Option<u32>

Index of current node in the parent children array.

children: Vec<u32>

Array that contains indexes of of children nodes.

Implementations

Trait Implementations

Formats the value using the given formatter. 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

Performs the conversion.

Performs the conversion.

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.