Skip to main content

Layout

Trait Layout 

Source
pub trait Layout: Send + Sync {
    // Required method
    fn render(&self, ctx: &LayoutContext<'_>) -> String;
}
Expand description

Trait for layout implementations.

Layouts produce a complete HTML page string wrapping the rendered component content. They must be Send + Sync for use in the global registry across threads.

Required Methods§

Source

fn render(&self, ctx: &LayoutContext<'_>) -> String

Render a complete HTML page using the provided context.

Implementors§