pub struct ActiveOnly;Expand description
Simplest strategy — all inactive screens are skipped every frame.
Use when screen tick methods are expensive (heavy DB queries, network calls) and force-tick-on-activation provides sufficient freshness.
Trait Implementations§
Source§impl Clone for ActiveOnly
impl Clone for ActiveOnly
Source§fn clone(&self) -> ActiveOnly
fn clone(&self) -> ActiveOnly
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ActiveOnly
impl Debug for ActiveOnly
Source§impl Default for ActiveOnly
impl Default for ActiveOnly
Source§fn default() -> ActiveOnly
fn default() -> ActiveOnly
Returns the “default value” for a type. Read more
Source§impl TickStrategy for ActiveOnly
impl TickStrategy for ActiveOnly
Source§fn should_tick(
&mut self,
_screen_id: &str,
_tick_count: u64,
_active_screen: &str,
) -> TickDecision
fn should_tick( &mut self, _screen_id: &str, _tick_count: u64, _active_screen: &str, ) -> TickDecision
Decide whether to tick an inactive screen on this frame.
Source§fn on_screen_transition(&mut self, _from: &str, _to: &str)
fn on_screen_transition(&mut self, _from: &str, _to: &str)
Called when the runtime observes a screen transition.
Source§fn maintenance_tick(&mut self, _tick_count: u64)
fn maintenance_tick(&mut self, _tick_count: u64)
Called periodically for maintenance work.
impl Copy for ActiveOnly
Auto Trait Implementations§
impl Freeze for ActiveOnly
impl RefUnwindSafe for ActiveOnly
impl Send for ActiveOnly
impl Sync for ActiveOnly
impl Unpin for ActiveOnly
impl UnsafeUnpin for ActiveOnly
impl UnwindSafe for ActiveOnly
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more