Skip to main content

Module message

Module message 

Source
Expand description

Transient messages: the one sentence an application says after something happened.

A message is not part of the tree. It has a lifetime rather than a position, and that lifetime belongs to the Renderer: how long it stays, where it sits, what it does when a second one arrives while the first is still up. Modelling it as a node would mean the Host holding “showing until four seconds from now” and building the tree again to take it away, which is a render for an animation nobody asked Rust about.

So a message is posted and forgotten. It rides out on the batch the current call produces, in the same way every other record does.

Structs§

Message
A sentence to show the user once, with an optional thing to do about it.

Functions§

show_message
Shows a message with no action, which is the common case.