Struct id_tree_layout::embedder::PlacedTreeItem
source · [−]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
sourceimpl Clone for PlacedTreeItem
impl Clone for PlacedTreeItem
sourcefn clone(&self) -> PlacedTreeItem
fn clone(&self) -> PlacedTreeItem
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for PlacedTreeItem
impl Debug for PlacedTreeItem
sourceimpl Default for PlacedTreeItem
impl Default for PlacedTreeItem
sourcefn default() -> PlacedTreeItem
fn default() -> PlacedTreeItem
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for PlacedTreeItem
impl Send for PlacedTreeItem
impl Sync for PlacedTreeItem
impl Unpin for PlacedTreeItem
impl UnwindSafe for PlacedTreeItem
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more