pub enum TickStrategyKind {
ActiveOnly,
Uniform {
divisor: u64,
},
ActivePlusAdjacent {
screens: Vec<String>,
background_divisor: u64,
},
Predictive {
config: PredictiveConfig,
},
}Expand description
Built-in strategy selection convenience enum.
Variants§
ActiveOnly
Tick only the active screen; all inactive screens are skipped.
Uniform
Tick all inactive screens every divisor frames.
ActivePlusAdjacent
Tick declared adjacent screens each frame; all others use a divisor.
Fields
Predictive
Predictive strategy using current config.
Fields
§
config: PredictiveConfigTrait Implementations§
Source§impl Clone for TickStrategyKind
impl Clone for TickStrategyKind
Source§fn clone(&self) -> TickStrategyKind
fn clone(&self) -> TickStrategyKind
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 TickStrategyKind
impl Debug for TickStrategyKind
Source§impl PartialEq for TickStrategyKind
impl PartialEq for TickStrategyKind
Source§impl TickStrategy for TickStrategyKind
impl TickStrategy for TickStrategyKind
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 Eq for TickStrategyKind
impl StructuralPartialEq for TickStrategyKind
Auto Trait Implementations§
impl Freeze for TickStrategyKind
impl RefUnwindSafe for TickStrategyKind
impl Send for TickStrategyKind
impl Sync for TickStrategyKind
impl Unpin for TickStrategyKind
impl UnsafeUnpin for TickStrategyKind
impl UnwindSafe for TickStrategyKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.