| 1 | use notify_rust::Notification; |
| 2 | fn main() { |
| 3 | // here we create a notification and then reuse a second time |
| 4 | |
| 5 | let mut notification = Notification::new() |
| 6 | .summary("News update") |
| 7 | .icon("computer") |
| 8 | .body("Something bad happened") |
| 9 | .finalize(); |
| 10 | |
| 11 | notification.show().unwrap(); |
| 12 | |
| 13 | std::thread::sleep(std::time::Duration::from_millis(1500)); |
| 14 | |
| 15 | notification.body("just kidding, nothing happened"); |
| 16 | notification.show().unwrap(); |
| 17 | } |