pub fn timed<State, Message, Theme, Renderer>(
boot: impl Boot<State, Message>,
update: impl Update<State, Message>,
subscription: impl Fn(&State) -> Subscription<Message>,
view: impl for<'a> View<'a, State, Message, Theme, Renderer>,
) -> Application<impl Program<State = State, Message = (Message, Instant), Theme = Theme>>
Expand description
Creates an Application
with an update
function that also
takes the Instant
of each Message
.
This constructor is useful to create animated applications that
are pure (e.g. without relying on side-effect calls like Instant::now
).
Purity is needed when you want your application to end up in the
same exact state given the same history of messages. This property
enables proper time traveling debugging with comet
.