Crate notify_rust [−] [src]
Desktop Notifications for Rust.
Desktop notifications are popup messages generated to notify the user of certain events.
Examples
// Example 1 use notify_rust::Notification; use notify_rust::NotificationHint as Hint; Notification::new() .summary("Firefox News") .body("This will almost look like a real firefox notification.") .icon("firefox") .timeout(6000) //miliseconds .show(); // Example 2 Notification::new() .summary("Another notification with actions") .body("Here each one was added separately.") .icon("firefox") .action("action0", "Press me please") .action("action1", "firefox") .show(); // Example 3 Notification::new() .summary("Category:email") .body("This has nothing to do with emails.\nIt should not go away untill you acknoledge it.") .icon("thunderbird") .appname("thunderbird") .hint(Hint::Category("email".to_string())) .hint(Hint::Resident(true)) .show();
Modules
server |
Experimental server taking the place of your Desktop Environments Notification Server. |
Structs
Notification |
Desktop Notification. |
ServerInformation |
Return value of |
Enums
NotificationHint | |
NotificationUrgency |
Functions
close_notification |
Close a Notification given by id. |
get_capabilities |
Get list of all capabilities of the running Notification Server. |
get_server_information |
Returns a struct containing ServerInformation. |
wait_for_action_signal |
Listens for the |