Trait taffy::LayoutTree
source · pub trait LayoutTree: PartialLayoutTree {
// Required methods
fn get_unrounded_layout(&self, node_id: NodeId) -> &Layout;
fn get_final_layout(&self, node_id: NodeId) -> &Layout;
fn set_final_layout(&mut self, node_id: NodeId, layout: &Layout);
}
Expand description
Extends PartialLayoutTree
with an additional guarantee: that the child/children methods can be used to recurse
infinitely down the tree. Enables Taffy’s rounding and debug printing methods to be used.
Required Methods§
sourcefn get_unrounded_layout(&self, node_id: NodeId) -> &Layout
fn get_unrounded_layout(&self, node_id: NodeId) -> &Layout
Get the node’s unrounded layout
sourcefn get_final_layout(&self, node_id: NodeId) -> &Layout
fn get_final_layout(&self, node_id: NodeId) -> &Layout
Get a reference to the node’s final layout
sourcefn set_final_layout(&mut self, node_id: NodeId, layout: &Layout)
fn set_final_layout(&mut self, node_id: NodeId, layout: &Layout)
Get a mutable reference to the node’s final layout
Object Safety§
This trait is not object safe.