Skip to main content

Notifier

Trait Notifier 

Source
pub trait Notifier {
    // Required methods
    fn request_permission(&self);
    fn notify(&self, request: NotifyRequest);
    fn cancel(&self, id: &str);
}
Expand description

Posts local notifications. Installed by the platform backend; the default is a no-op.

Required Methods§

Source

fn request_permission(&self)

Request permission to show notifications (idempotent; safe to call more than once).

Source

fn notify(&self, request: NotifyRequest)

Post (or replace, by id) a local notification.

Source

fn cancel(&self, id: &str)

Remove a delivered or pending notification by id.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§