Debian Codegraph @

examples/at_bus.rs

raw symbols ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
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 fn main() -> Result<(), Box<dyn std::error::Error>> {
8 use notify_rust::Notification;
9 std::env::set_var(
10 "RUST_LOG",
11 "simple=trace,zbus=trace,server=trace,notify_rust=trace",
12 );
13 color_backtrace::install();
14 #[cfg(feature = "env_logger")]
15 let _ = env_logger::builder().is_test(true).try_init();
16
17 #[allow(deprecated)]
18 Notification::at_bus("example")
19 .summary("Critical Error")
20 .body("Just <b>kidding</b>, this is just the notification (example).")
21 .icon("dialog-error")
22 .show()?;
23 Ok(())
24 }