Skip to main content

Notifier

Trait Notifier 

Source
pub trait Notifier {
    // Required method
    fn notify(&self, title: &str, body: &str) -> Result<(), Error>;
}
Expand description

Abstraction over desktop notification, allowing test mocks.

The production implementation is AutoNotifier, which shells out to notify-send (Linux), osascript / terminal-notifier (macOS), or PowerShell (Windows). See crate::notify for details.

Required Methods§

Source

fn notify(&self, title: &str, body: &str) -> Result<(), Error>

Send a desktop notification with the given title and body.

Implementors§