Skip to main content

LayoutEngine

Trait LayoutEngine 

Source
pub trait LayoutEngine {
    // Required method
    fn compute_layout(
        &mut self,
        root: NodeId,
        max_size: Size,
    ) -> Result<LayoutTree, NodeError>;
}
Expand description

Extension trait that equips MemoryApplier with layout computation.

Required Methods§

Source

fn compute_layout( &mut self, root: NodeId, max_size: Size, ) -> Result<LayoutTree, NodeError>

Measures the tree under root within max_size and returns its layout tree.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl LayoutEngine for MemoryApplier

Source§

fn compute_layout( &mut self, root: NodeId, max_size: Size, ) -> Result<LayoutTree, NodeError>

Implementors§