pub trait Application: Sized {
type Theme: Theme;
// Required methods
fn build(context: AppContext) -> impl Widget;
fn config(&self) -> MayConfig<Self::Theme>;
// Provided methods
fn plugins(&self) -> PluginManager<Self::Theme> { ... }
fn run(self) { ... }
}Expand description
The main application interface.
Contains basic functions for the MayRunner to create and run an application.
Required Associated Types§
Sourcetype Theme: Theme
type Theme: Theme
The theme of the application and its widgets.
See maycoon_theme::theme for built-in themes.
Required Methods§
Sourcefn build(context: AppContext) -> impl Widget
fn build(context: AppContext) -> impl Widget
Renders/builds the application’s widgets.
This function will be passed to the MayRunner to create and run the application.
Provided Methods§
Sourcefn plugins(&self) -> PluginManager<Self::Theme>
fn plugins(&self) -> PluginManager<Self::Theme>
Builds and returns the PluginManager for the application.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.