pub trait NotificationManager {
// Required methods
fn new_notification(
&self,
notification: Notification,
) -> Result<(), NotiError>;
fn close_notification(&self, id: u32) -> Result<(), NotiError>;
}Expand description
This trait’s implementation is necessary for passing spell’s generated widget
into the notification field of cast_spell macro. It is important to note that
implementation of this trait is not on the spell generated widget/window but on the
slint generated window. For example, a window with name TopBar will have a
spell implemetation TopBarSpell. This trait will be implemented over TopBar.
Required Methods§
Sourcefn new_notification(&self, notification: Notification) -> Result<(), NotiError>
fn new_notification(&self, notification: Notification) -> Result<(), NotiError>
This method is called when a new notification is sent.