pub trait ScreenTickDispatch {
// Required methods
fn screen_ids(&self) -> Vec<String>;
fn active_screen_id(&self) -> String;
fn tick_screen(&mut self, screen_id: &str, tick_count: u64);
}Expand description
Implemented by Models that manage multiple
screens and want per-screen tick control via TickStrategy.
The runtime checks for this trait via
Model::as_screen_tick_dispatch.
When present, the runtime ticks individual screens instead of calling a
monolithic update(Tick).
Required Methods§
Sourcefn screen_ids(&self) -> Vec<String>
fn screen_ids(&self) -> Vec<String>
Returns IDs of all currently registered screens.
Sourcefn active_screen_id(&self) -> String
fn active_screen_id(&self) -> String
Returns the ID of the currently active/visible screen.
Sourcefn tick_screen(&mut self, screen_id: &str, tick_count: u64)
fn tick_screen(&mut self, screen_id: &str, tick_count: u64)
Tick a specific screen by ID.
Called by the runtime for each screen the TickStrategy approves.
Unknown screen IDs should be silently ignored.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".