File: info.rs

package info (click to toggle)
rust-notify-rust 4.11.6-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 604 kB
  • sloc: sh: 18; makefile: 4
file content (25 lines) | stat: -rw-r--r-- 823 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#[cfg(all(unix, not(target_os = "macos")))]
fn main() {
    #[cfg(feature = "env_logger")]
    env_logger::init();
    match notify_rust::get_server_information() {
        Ok(info) => {
            println!("{}:", info.name);
            println!("  ServerInformation:");
            println!("    name: {}", info.name);
            println!("    vendor: {}", info.vendor);
            println!("    version: {}", info.version);
            println!("    spec_version: {}", info.spec_version);
            println!(
                "  capabilities:  {:#?}",
                notify_rust::get_capabilities().unwrap_or_default()
            );
        }
        Err(err) => eprintln!("error: {}", err),
    }
}

#[cfg(any(target_os = "windows", target_os = "macos"))]
fn main() {
    println!("this is a xdg only feature")
}