Function rs::event_loop::handle_event
source · [−]fn handle_event<S: ActorState>(
loop_state: State<S>,
event: S::Event,
now: Instant
) -> (State<S>, <S::Outcome as Outcome>::Commands)
Expand description
A single iteration of the loop, updating its persistent state.
- updates tracker state,
- determines outcome,
- determines next scheduled animation wakeup, and because this is a pure function, it’s easily testable. It returns the new state, and the message to send onwards.