Debian Codegraph @

examples/progress.rs

raw symbols SCIP
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 let mut notification = notify_rustrust-analyzer cargo notify-rust 4.18.0 crate/::Notificationrust-analyzer cargo notify-rust 4.18.0 notification/Notification#::newrust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]new().()
9 .summaryrust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]summary().("progress")
10 .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().;
11 for i in 0..=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeInclusive#10 {
12 let value = i rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul().10;
13 notification
14 .bodyrust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]body().(&formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!("progress {}%", value))
15 .hintrust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]hint().(notify_rustrust-analyzer cargo notify-rust 4.18.0 crate/::Hintrust-analyzer cargo notify-rust 4.18.0 hints/Hint#::CustomIntrust-analyzer cargo notify-rust 4.18.0 hints/Hint#CustomInt#("value".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(), value));
16 stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::threadrust-analyzer cargo std https://github.com/rust-lang/rust/library/std thread/::sleeprust-analyzer cargo std https://github.com/rust-lang/rust/library/std thread/functions/sleep().(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#::from_secsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core time/impl#[Duration]from_secs().(1));
17 notification.updaterust-analyzer cargo notify-rust 4.18.0 xdg/impl#[NotificationHandle]update().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().();
18 }
19 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(())
20 }