Skip to main content

ActiveTheme

Trait ActiveTheme 

Source
pub trait ActiveTheme {
    // Required method
    fn theme(&self) -> &Theme;
}
Expand description

Reads the active theme from any context that dereferences to App.

Components take &mut App during render and pull the theme themselves, so callers never thread a &Theme through builder arguments.

Required Methods§

Source

fn theme(&self) -> &Theme

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl ActiveTheme for App

Source§

fn theme(&self) -> &Theme

Implementors§