| 1 | #![allow(unused_imports)] |
| 2 | |
| 3 | use notify_rustrust-analyzer cargo notify-rust 4.18.0 crate/::Hintrust-analyzer cargo notify-rust 4.18.0 hints/Hint#; |
| 4 | #[cfg(all(feature = "images_no_default_features", unix, not(target_os = "macos")))] |
| 5 | use notify_rustrust-analyzer cargo notify-rust 4.18.0 crate/::Imagerust-analyzer cargo notify-rust 4.18.0 image/Image#; |
| 6 | use notify_rustrust-analyzer cargo notify-rust 4.18.0 crate/::Notificationrust-analyzer cargo notify-rust 4.18.0 notification/Notification#; |
| 7 | |
| 8 | #[cfg(any(target_os = "windows", target_os = "macos"))] |
| 9 | fn main() { |
| 10 | printlnrust-analyzer cargo std https://github.com/rust-lang/rust/library/std macros/println!!("this is a xdg only feature") |
| 11 | } |
| 12 | |
| 13 | #[cfg(all( |
| 14 | not(feature = "images_no_default_features"), |
| 15 | unix, |
| 16 | not(target_os = "macos") |
| 17 | ))] |
| 18 | fn main() { |
| 19 | printlnrust-analyzer cargo std https://github.com/rust-lang/rust/library/std macros/println!!("please build with '--features=images'") |
| 20 | } |
| 21 | |
| 22 | #[cfg(all( |
| 23 | feature = "images_no_default_features", |
| 24 | unix, |
| 25 | not(target_os = "macos"), |
| 26 | not(target_os = "windows") |
| 27 | ))] |
| 28 | 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#>> { |
| 29 | fn image_datarust-analyzer cargo notify-rust 4.18.0 image_data().() -> Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<u8> { |
| 30 | let mut image_data = vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0; 128 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul(). 128 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul(). 3]; |
| 31 | for i in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#128 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul().128 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul().3 { |
| 32 | image_data[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().i]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut(). = (i rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem().%rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem().256) as u8; |
| 33 | } |
| 34 | image_data |
| 35 | } |
| 36 | |
| 37 | Notificationrust-analyzer cargo notify-rust 4.18.0 notification/Notification#::newrust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]new().() |
| 38 | .summaryrust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]summary().("Generated Image (.hint())") |
| 39 | .bodyrust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]body().("You should see stripes in this notification") |
| 40 | .hintrust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]hint().(Hintrust-analyzer cargo notify-rust 4.18.0 hints/Hint#::ImageDatarust-analyzer cargo notify-rust 4.18.0 hints/Hint#ImageData#(Imagerust-analyzer cargo notify-rust 4.18.0 image/Image#::from_rgbrust-analyzer cargo notify-rust 4.18.0 image/impl#[Image]from_rgb().(128, 128, image_datarust-analyzer cargo notify-rust 4.18.0 image_data().())?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().)) |
| 41 | .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().; |
| 42 | |
| 43 | Notificationrust-analyzer cargo notify-rust 4.18.0 notification/Notification#::newrust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]new().() |
| 44 | .summaryrust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]summary().("Generated Image (.image_data())") |
| 45 | .bodyrust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]body().("You should see stripes in this notification") |
| 46 | .image_datarust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]image_data().(Imagerust-analyzer cargo notify-rust 4.18.0 image/Image#::from_rgbrust-analyzer cargo notify-rust 4.18.0 image/impl#[Image]from_rgb().(128, 128, image_datarust-analyzer cargo notify-rust 4.18.0 image_data().())?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().) |
| 47 | .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().; |
| 48 | |
| 49 | Notificationrust-analyzer cargo notify-rust 4.18.0 notification/Notification#::newrust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]new().() |
| 50 | .summaryrust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]summary().(".image()") |
| 51 | .bodyrust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]body().("Trying to open an image") |
| 52 | .imagerust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]image().("./examples/octodex.jpg")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch(). |
| 53 | .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().; |
| 54 | |
| 55 | Notificationrust-analyzer cargo notify-rust 4.18.0 notification/Notification#::newrust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]new().() |
| 56 | .summaryrust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]summary().(".image_path()") |
| 57 | .bodyrust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]body().("Trying to open an image") |
| 58 | .image_pathrust-analyzer cargo notify-rust 4.18.0 notification/impl#[Notification]image_path().("./examples/octodex.jpg") |
| 59 | .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().; |
| 60 | |
| 61 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(()) |
| 62 | } |