pub fn update(state: State, msg: Msg) -> (State, Command<Effect, Msg>)Expand description
Pure state-transition function. Each arm returns the next State and a
Command that the runtime drains (synchronous events re-fed through
update; effects handed to EffectRunner). This function spawns no
threads and performs no IO; state.now is the runtime’s clock for any
score/age math.
One pragmatic compromise: the three arms that open the spinner modal
(DrillIn, DrillOut when dirty, ConfirmDelete) call
std::time::Instant::now() to seed Loading::started. That field only
drives the “Ns elapsed” line in the modal — no control flow depends on
it, so the function is observably pure for routing and assertions, but
Loading::started itself is non-deterministic across runs.