pub trait ShellHooks {
// Required method
fn frame_input(&mut self, sim: &Sim) -> FrameInput;
// Provided method
fn on_frame(&mut self, _sim: &mut Sim, _dt: Duration) { ... }
}Expand description
Per-frame hooks the game implements. Snapshot production (frame_input)
is the only required render coupling: plain data out, no renderer types.
Required Methods§
Sourcefn frame_input(&mut self, sim: &Sim) -> FrameInput
fn frame_input(&mut self, sim: &Sim) -> FrameInput
Build this frame’s viewport snapshot from sim + UI state.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".