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§
Sourcefn outlet(&mut self, element: AnyElement)
fn outlet(&mut self, element: AnyElement)
Sets the outlet element that the layout should render its children into.
Sourcefn render_layout(
self: Box<Self>,
window: &mut Window,
cx: &mut App,
) -> AnyElement
fn render_layout( self: Box<Self>, window: &mut Window, cx: &mut App, ) -> AnyElement
Renders the layout with the given outlet element.