pub trait App: Sized {
const UPDATES_PER_SECOND: u32;
const RENDERS_PER_SECOND: u32;
// Required methods
fn update(&mut self, dt: Duration);
fn render(&mut self, dt: Duration);
fn window_event(&mut self, event: WindowEvent) -> ControlFlow;
fn device_event(&mut self, event: DeviceEvent) -> ControlFlow;
}
Required Associated Constants§
const UPDATES_PER_SECOND: u32
const RENDERS_PER_SECOND: u32
Required Methods§
fn update(&mut self, dt: Duration)
fn render(&mut self, dt: Duration)
fn window_event(&mut self, event: WindowEvent) -> ControlFlow
fn device_event(&mut self, event: DeviceEvent) -> ControlFlow
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.