Debian Codegraph @

examples/info.rs

raw symbols SCIP
1 #[cfg(all(unix, not(target_os = "macos")))]
2 fn mainrust-analyzer cargo notify-rust 4.18.0 main().() {
3 #[cfg(feature = "env_logger")]
4 env_loggerrust-analyzer cargo env_logger 0.11.11 crate/::initrust-analyzer cargo env_logger 0.11.11 logger/init().();
5 match notify_rustrust-analyzer cargo notify-rust 4.18.0 crate/::get_server_informationrust-analyzer cargo notify-rust 4.18.0 xdg/get_server_information().() {
6 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(info) => {
7 printlnrust-analyzer cargo std https://github.com/rust-lang/rust/library/std macros/println!!("{}:", info.namerust-analyzer cargo notify-rust 4.18.0 xdg/ServerInformation#name.);
8 printlnrust-analyzer cargo std https://github.com/rust-lang/rust/library/std macros/println!!(" ServerInformation:");
9 printlnrust-analyzer cargo std https://github.com/rust-lang/rust/library/std macros/println!!(" name: {}", info.namerust-analyzer cargo notify-rust 4.18.0 xdg/ServerInformation#name.);
10 printlnrust-analyzer cargo std https://github.com/rust-lang/rust/library/std macros/println!!(" vendor: {}", info.vendorrust-analyzer cargo notify-rust 4.18.0 xdg/ServerInformation#vendor.);
11 printlnrust-analyzer cargo std https://github.com/rust-lang/rust/library/std macros/println!!(" version: {}", info.versionrust-analyzer cargo notify-rust 4.18.0 xdg/ServerInformation#version.);
12 printlnrust-analyzer cargo std https://github.com/rust-lang/rust/library/std macros/println!!(" spec_version: {}", info.spec_versionrust-analyzer cargo notify-rust 4.18.0 xdg/ServerInformation#spec_version.);
13 printlnrust-analyzer cargo std https://github.com/rust-lang/rust/library/std macros/println!!(
14 " capabilities: {:#?}",
15 notify_rustrust-analyzer cargo notify-rust 4.18.0 crate/::get_capabilitiesrust-analyzer cargo notify-rust 4.18.0 xdg/get_capabilities().().unwrap_or_defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap_or_default().()
16 );
17 }
18 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(err) => eprintlnrust-analyzer cargo std https://github.com/rust-lang/rust/library/std macros/eprintln!!("error: {}", err),
19 }
20 }
21
22 #[cfg(any(target_os = "windows", target_os = "macos"))]
23 fn main() {
24 printlnrust-analyzer cargo std https://github.com/rust-lang/rust/library/std macros/println!!("this is a xdg only feature")
25 }