Skip to main content

Module flash

Module flash 

Source
Expand description

Flash messages rendered as daisyUI toast alerts in _flash.html.

Handlers push messages via [axum_messages::Messages]; the next page’s _flash.html partial drains them at render time via crate::context::flashes and they’re cleared from the session on response write — one-shot, never in the URL.

Structs§

Flash
One message for _flash.html.
FlashOob
Renders pending flashes as an htmx out-of-band swap appended to #flash. Used by htmx_flash for in-place htmx responses that never re-render the layout. The per-alert markup mirrors layout.html by design.

Functions§

drain
Drain pending messages into template-ready flashes.
htmx_flash
Append pending flash messages to in-place htmx responses as an OOB swap.