Expand description
§notifications
notifications provides a notification daemon which receives and manages notifications sent by
applications on GNU/Linux desktops that follow XDG Desktop Notifications Specification.
§Example
use notifications::NotificationService;
let service = NotificationService::new(None).unwrap();
service.run().await.unwrap();
service.on_notified(|(id, notification, replace)| println!("New
notification! id: {}, summary: {}, replaces old one: {}", id, notification.summary(), replace));
service.on_notification_closed(|(id, reason)| println!("Notification closed! id: {},
reason: {:?}", id, reason));
Structs§
- Action
Handle - A handle which represents a notification action.
- Notification
Handle - A handle to a notification.
- Notification
Service - A notification daemon that follows XDG Desktop Notifications Specification.
- Settings
- Settings for
NotificationService.
Enums§
- Close
Reason - A reason why the notification is closed.
- Error
- Enum representing possible errors to happen during the usage of
crate::NotificationService. - Urgency
- The urgency level of the notification.
Type Aliases§
- Result
- Alias for a
std::result::Resultwith the error typecrate::Error.