Skip to main content

PrintTree

Trait PrintTree 

Source
pub trait PrintTree: TraverseTree {
    // Required methods
    fn get_debug_label(&self, node_id: NodeId) -> &'static str;
    fn get_final_layout(&self, node_id: NodeId) -> Layout;
}
Expand description

Trait used by the print_tree method which prints a debug representation

As indicated by it’s dependence on TraverseTree, it required full recursive access to the tree.

Required Methods§

Source

fn get_debug_label(&self, node_id: NodeId) -> &'static str

Get a debug label for the node (typically the type of node: flexbox, grid, text, image, etc)

Source

fn get_final_layout(&self, node_id: NodeId) -> Layout

Get a reference to the node’s final layout

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<NodeContext> PrintTree for TaffyTree<NodeContext>