pub trait Application: Sized {
type Theme: Theme;
type Graphics: VectorGraphicsInterface;
type State;
// Required methods
fn build(context: AppContext, state: Self::State) -> impl Widget;
fn config(&self) -> MayConfig<Self::Theme, Self::Graphics>;
// Provided methods
fn plugins(&self) -> PluginManager<Self::Theme, Self::Graphics> { ... }
fn init(&self) { ... }
fn run(self, state: Self::State) { ... }
}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.
Sourcetype Graphics: VectorGraphicsInterface
type Graphics: VectorGraphicsInterface
The vector graphics interface to use for rendering.
See VectorGraphicsInterface for more.
Required Methods§
Provided Methods§
Sourcefn plugins(&self) -> PluginManager<Self::Theme, Self::Graphics>
fn plugins(&self) -> PluginManager<Self::Theme, Self::Graphics>
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.