Debian Codegraph @

examples/simple_async.rs

raw symbols SCIP
1 #[cfg(any(target_os = "windows", target_os = "macos"))]
2 fn main() {
3 println!("this is an xdg only feature")
4 }
5
6 #[cfg(all(unix, not(target_os = "macos")))]
7 #[async_std::main]
8 async fn main() -> Result<(), Box<dyn std::error::Error>> {
9 use notify_rust::Notification;
10 Notification::new()
11 .summary("async notification")
12 .body("this notification was sent via an async api")
13 .icon("dialog-positive")
14 .show_async()
15 .await?;
16 Ok(())
17 }