LayoutProvider

Trait LayoutProvider 

Source
pub trait LayoutProvider:
    Send
    + Sync
    + 'static {
    // Required method
    fn compute(
        &self,
        ctx: &LayoutContext<'_>,
        sizes: &WidgetSizes,
    ) -> LayoutResult;
}
Expand description

Trait for custom layout providers

Implement this trait to create reusable, testable layout logic.

Required Methods§

Source

fn compute(&self, ctx: &LayoutContext<'_>, sizes: &WidgetSizes) -> LayoutResult

Compute layout areas for widgets

Implementors§