pub struct PlacedTreeItem {
    pub y_order: usize,
    pub x_center: usize,
    pub x_extent: usize,
    pub x_extent_children: usize,
    pub text: String,
    pub is_emphasized: bool,
    pub parent: Option<usize>,
    pub ord: usize,
}
Expand description

The PlacedTreeItem is the embedding information for one single tree node. It is used only in a collection type Embedding. External API: keep stable.

Fields

y_order: usize

The nodes level, root has level 0. Can be used to calculate an y coordinate for the node

x_center: usize

The logical x coordinate of the node’s center

x_extent: usize

The x-extent of the nodes text representation in logical coordinate units

x_extent_children: usize

The maximum extent over the nodes text representation and the sum of all children’s x-extent

text: String

The text representation of the nodes data - created by the Visualize trait’s implementation

is_emphasized: bool

The emphasize property obtained from the Visualize trait

parent: Option<usize>

The parent’s ord, if there is one

ord: usize

A unique number reflecting the topological post-ordering of the nodes in the tree

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

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
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.