| 1 |
#[cfg(any(target_os = "windows", target_os = "macos"))] |
| 2 |
fn main() { |
| 3 |
printlnrust-analyzer cargo std https://github.com/rust-lang/rust/library/std macros/println!!("this is an xdg only feature") |
| 4 |
} |
| 5 |
|
| 6 |
#[cfg(all(unix, not(target_os = "macos",)))] |
| 7 |
fn mainrust-analyzer cargo notify-rust 4.18.0 main().() -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<dyn stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std error/::Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core error/Error#>> { |
| 8 |
use notify_rustrust-analyzer cargo notify-rust 4.18.0 crate/::Notificationrust-analyzer cargo notify-rust 4.18.0 notification/Notification#; |
| 9 |
stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::envrust-analyzer cargo std https://github.com/rust-lang/rust/library/std env/::set_varrust-analyzer cargo std https://github.com/rust-lang/rust/library/std env/set_var().( |
| 10 |
"RUST_LOG", |
| 11 |
"simple=trace,zbus=trace,server=trace,notify_rust=trace", |
| 12 |
); |
| 13 |
#[cfg(feature = "env_logger")] |
| 14 |
let _ = env_loggerrust-analyzer cargo env_logger 0.11.11 crate/::builderrust-analyzer cargo env_logger 0.11.11 logger/builder().().is_testrust-analyzer cargo env_logger 0.11.11 logger/impl#[Builder]is_test().(true).try_initrust-analyzer cargo env_logger 0.11.11 logger/impl#[Builder]try_init().(); |
| 15 |
|
| 16 |
#[allow(deprecated)] |
| 17 |
Notificationrust-analyzer cargo notify-rust 4.18.0 notification/Notification#::at_busrust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]at_bus().("example") |
| 18 |
.summaryrust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]summary().("Critical Error") |
| 19 |
.bodyrust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]body().("Just <b>kidding</b>, this is just the notification (example).") |
| 20 |
.iconrust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]icon().("dialog-error") |
| 21 |
.showrust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]show().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 22 |
Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(()) |
| 23 |
} |