| 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 a 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/::*; |
| 9 | use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::timerust-analyzer cargo std https://github.com/rust-lang/rust/library/std time/::Durationrust-analyzer cargo core https://github.com/rust-lang/rust/library/core time/Duration#; |
| 10 | |
| 11 | Notificationrust-analyzer cargo notify-rust 4.18.0 notification/Notification#::newrust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]new().() |
| 12 | .summaryrust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]summary().("Notification Duration timeout") |
| 13 | .bodyrust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]body().("this one should stay for 2s") |
| 14 | .iconrust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]icon().("timer") |
| 15 | .timeoutrust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]timeout().(Durationrust-analyzer cargo core https://github.com/rust-lang/rust/library/core time/Duration#::from_secsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core time/impl#[Duration]from_secs().(2)) |
| 16 | .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().; |
| 17 | |
| 18 | Notificationrust-analyzer cargo notify-rust 4.18.0 notification/Notification#::newrust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]new().() |
| 19 | .summaryrust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]summary().("Notification ms timeout") |
| 20 | .bodyrust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]body().("this one should stay for 2s (2000ms)") |
| 21 | .iconrust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]icon().("timer") |
| 22 | .timeoutrust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]timeout().(2_000) |
| 23 | .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().; |
| 24 | |
| 25 | Notificationrust-analyzer cargo notify-rust 4.18.0 notification/Notification#::newrust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]new().() |
| 26 | .summaryrust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]summary().("Notification string timeout") |
| 27 | .bodyrust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]body().("this one should stay for 2s (\"2000\")") |
| 28 | .iconrust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]icon().("timer") |
| 29 | .timeoutrust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]timeout().("2000".parserust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]parse().::<Timeoutrust-analyzer cargo notify-rust 4.18.0 timeout/Timeout#>().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()) |
| 30 | .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().; |
| 31 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(()) |
| 32 | } |