pub trait Game: Sized + 'static {
// Required methods
fn init() -> Result<Self, String>;
fn frame(&mut self);
// Provided method
fn exit(&mut self) { ... }
}Expand description
A gasm game. init runs once; frame runs at the configured frame rate.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".