Skip to main content

ScreenView

Trait ScreenView 

Source
pub trait ScreenView<C: PixelColor, M: Clone> {
    // Required methods
    fn name(&self) -> &'static str;
    fn view(&self) -> Element<'_, C, M>;
    fn theme(&self) -> &Theme<'_, C>;
}
Expand description

Per-screen contract.

Required Methods§

Source

fn name(&self) -> &'static str

Human-readable screen name.

Source

fn view(&self) -> Element<'_, C, M>

Build a fresh widget tree from &self. Called once per frame; the returned tree is owned for that frame and dropped at its end.

Source

fn theme(&self) -> &Theme<'_, C>

Theme used to draw this screen.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§