Skip to main content

Module toast

Module toast 

Source
Expand description

Timed toast notifications for the TUI.

A ToastQueue holds up to three Toast entries with an Instant-based expiration. The renderer draws visible toasts in a single row each, stacked top-to-bottom with the newest entry at the top. Expiration is driven by calls to ToastQueue::tick — the TUI runner invokes it on a periodic timer so toasts disappear even when no key / bus events arrive.

Toasts overlay every other chrome including the modal dialog, so outcome messages (Event::ProfileSaved, Event::ProfileLoadFailed, Event::Error) are always visible regardless of menu state.

Symbol choice: ASCII prefixes (i , ! , x ) keep snapshot output deterministic across terminals that render unicode differently. Colour distinguishes severity.

Structs§

Toast
A single toast message with an expiration time.
ToastQueue
Bounded queue of visible toasts.

Enums§

ToastLevel
Severity level for a toast. Drives the foreground colour.

Functions§

render_toasts
Render the queue’s visible toasts into area.