pub trait App {
// Required methods
fn on_start(&mut self, ctx: &mut EngineContext);
fn on_update(&mut self, ctx: &mut EngineContext, dt: f32);
fn on_render(&mut self, ctx: &mut EngineContext);
fn on_stop(&mut self, ctx: &mut EngineContext);
// Provided methods
fn initial_pipeline() -> PipelineFactory
where Self: Sized { ... }
fn register_loaders(_registry: &mut LoaderRegistry)
where Self: Sized { ... }
fn window_config() -> WindowConfig
where Self: Sized { ... }
fn tick_rate(&self) -> f32 { ... }
}Required Methods§
fn on_start(&mut self, ctx: &mut EngineContext)
fn on_update(&mut self, ctx: &mut EngineContext, dt: f32)
fn on_render(&mut self, ctx: &mut EngineContext)
fn on_stop(&mut self, ctx: &mut EngineContext)
Provided Methods§
fn initial_pipeline() -> PipelineFactorywhere
Self: Sized,
fn register_loaders(_registry: &mut LoaderRegistry)where
Self: Sized,
fn window_config() -> WindowConfigwhere
Self: Sized,
fn tick_rate(&self) -> f32
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".