Skip to main content

tick_task

Function tick_task 

Source
pub fn tick_task<M>(msg: M) -> Task<M>
where M: 'static,
Expand description

Self-rescheduling animation clock: a Task that waits one frame (~16 ms) and then yields msg, so the host’s ScrollTick arm can call ScrollState::tick and re-arm while ScrollState::is_animating.

This drives momentum without a perpetual time::every subscription: the loop stops the moment the host stops returning another tick_task.