Skip to main content

Module tick_strategy

Module tick_strategy 

Source
Expand description

Tick strategy primitives for selective background ticking.

The runtime always ticks the active screen. A TickStrategy decides whether each inactive screen should receive a tick on a given frame.

§Standalone structs vs. convenience enum

Each built-in strategy has a standalone struct (ActiveOnly, Uniform, ActivePlusAdjacent) that implements TickStrategy directly. For quick selection among built-ins, use TickStrategyKind which delegates to the same logic.

Structs§

ActiveOnly
Simplest strategy — all inactive screens are skipped every frame.
ActivePlusAdjacent
Tick the active screen’s declared neighbors at full rate while all other inactive screens use a reduced divisor.
Custom
Closure-based tick strategy for app-specific logic.
DecayConfig
Configuration for automatic temporal decay in MarkovPredictor.
MarkovPredictor
Markov-chain predictor wrapping a TransitionCounter.
Predictive
Markov-chain-driven tick strategy.
PredictiveConfig
Minimal predictive strategy config used by TickStrategyKind.
PredictiveStrategyConfig
Configuration for the Predictive tick strategy.
ScreenPrediction
A single screen prediction with probability and confidence.
TickAllocation
Maps transition probability to tick divisor.
TransitionCounter
In-memory frequency matrix for (from, to) transition counting.
TransitionEntry
A single recorded screen transition.
TransitionHistory
Fixed-capacity ring buffer of screen transitions.
Uniform
Tick every inactive screen at a fixed reduced rate: every Nth frame.

Enums§

AllocationCurve
Curve controlling how probability maps to divisor.
TickDecision
Decision returned by a TickStrategy for an inactive screen.
TickStrategyKind
Built-in strategy selection convenience enum.

Traits§

ScreenTickDispatch
Implemented by Models that manage multiple screens and want per-screen tick control via TickStrategy.
TickStrategy
Controls which inactive screens get ticked on each frame.