Skip to main content

Module notification

Module notification 

Source
Expand description

Messages for a panel user: the toast a write flashes, and the StoredNotifications Notifications sends to the bell of a panel with Panel::notifications.

Re-exports§

pub use self::bell::clear_notifications;
pub use self::bell::mark_all_notifications_read;
pub use self::bell::mark_notification;
pub use self::bell::notification_bell;
pub use self::bell::remove_notification;
pub use self::stored::StoredNotification;

Structs§

LiveToast
Owns the signals that mount a Notification in place without navigation.
LiveToasterProps
Reads the page’s LiveToast signals and mounts the toast in place when one is set.
LiveToasterPropsBuilder
Typestate builder for LiveToasterProps, created by LiveToasterProps::builder(). build() becomes available once every required property has been set.
StoredNotification
Shipped record of a Notification kept for one panel user: what it says, whose it is, on which panel and for which tenant, and whether they read it.
clear_notifications
Removes every notification the bell lists.
live_toaster
Reads the page’s LiveToast signals and mounts the toast in place when one is set.
mark_all_notifications_read
Marks every notification the bell lists read.
mark_notification
Marks one of the user’s notifications read, or unread with read false. An id the user’s inbox does not hold changes nothing.
notification_bell
The bell: its trigger with the unread count, and the sheet it opens.
remove_notification
Removes one of the user’s notifications. An id the user’s inbox does not hold changes nothing.

Functions§

live_toast
The live toast signals for this request (call once per page).
render_notification
Renders one notification as the toast, with attrs merged onto its surface.
set_notification
Store a notification for the next request (flash).
take_notification
Take the notification from the request (if present) and clear it.