Expand description
ToastSurface — the rendered chrome of one toast.
Built by ToastHost for each live entry. Owns the severity
glyph, title + body column, action row, close button, and the
Role::Alert / Role::Status AccessKit node mapping. The visual
chrome (background, padding, layout) is delegated to the active
ToastStyle via make_body.
An update in place (Toast::id) rebuilds the surface of that one
entry, and the rebuild reconciles: the surface’s own node stays
(so the toast is announced again only if its name changed), and the
glyph, title, body, each action and the close button are kept when
the update left them as they were. A progress toast updated every
160 ms therefore keeps the Cancel a keyboard user is on, and a kept
action calls the action of the latest update, not of the one that
built it.
Structs§
- Toast
Surface - One rendered toast — chrome owned by
ToastStyle::make_body, functional pieces (glyph, body, action row, close button) owned by this widget. Built once per entry by the host; an update in place rebuilds it and keeps what did not change (see the module docs). - Toast
Surface Data - Snapshot data passed to a
ToastSurfacefor one live entry. Owned by the host’sLiveEntryand cloned into the surface at build time.Rc<...>fields keep callbacks cheap to copy.