taffy

Trait 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§

Source

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

Get the node’s unrounded layout

Source

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

Get a reference to the node’s final layout

Source

fn set_final_layout(&mut self, node_id: NodeId, layout: &Layout)

Get a mutable 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", so this trait is not object safe.

Implementors§