Layout

Trait Layout 

Source
pub trait Layout {
    // Required methods
    fn outlet(&mut self, element: AnyElement);
    fn render_layout(
        self: Box<Self>,
        window: &mut Window,
        cx: &mut App,
    ) -> AnyElement;
}
Expand description

A layout that can wrap around routed elements. Used by Router to render layouts around matched routes.

Required Methods§

Source

fn outlet(&mut self, element: AnyElement)

Sets the outlet element that the layout should render its children into.

Source

fn render_layout( self: Box<Self>, window: &mut Window, cx: &mut App, ) -> AnyElement

Renders the layout with the given outlet element.

Implementors§