pub trait Application: Sized + 'static {
// Required methods
fn new(context: EngineContext) -> Self;
fn update(&mut self);
fn render(&mut self) -> Vec<RenderObject>;
}
Expand description
Application trait for user-defined applications.
Required Methods§
Sourcefn new(context: EngineContext) -> Self
fn new(context: EngineContext) -> Self
Called once at the beginning of the application to create the initial state.
Sourcefn render(&mut self) -> Vec<RenderObject>
fn render(&mut self) -> Vec<RenderObject>
Called every frame to handle rendering.
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.