### Show Basic Toast Notification Source: https://github.com/allenbenz/winrt-notification/blob/main/README.md Demonstrates how to create and display a simple toast notification using the winrt-notification crate. It includes setting the application ID, title, text content, sound, and duration. ```rust extern crate winrt_notification; use winrt_notification::{Duration, Sound, Toast}; fn main() { Toast::new(Toast::POWERSHELL_APP_ID) .title("Look at this flip!") .text1("(╯°□°)╯︵ ┻━┻") .sound(Some(Sound::SMS)) .duration(Duration::Short) .show() .expect("unable to toast"); } ``` -------------------------------- ### Show Toast Notification with Images and Customizations Source: https://github.com/allenbenz/winrt-notification/blob/main/README.md Illustrates advanced usage of the winrt-notification crate, including displaying hero images, circular icons, and multiple images within a toast notification. It also shows how to set an app user mode ID and disable sound. ```rust extern crate winrt_notification; use std::path::Path; use winrt_notification::{IconCrop, Toast}; fn main() { Toast::new("Your AppUserModeId") .hero(&Path::new("C:\\absolute\\path\\to\\image.jpeg"), "alt text") .icon( &Path::new("c:/this/style/works/too/image.png"), IconCrop::Circular, "alt text", ) .title("Lots of pictures here") .text1("One above the text as the hero") .text2("One to the left as an icon, and several below") .image(&Path::new("c:/photos/sun.png"), "the sun") .image(&Path::new("c:/photos/moon.png"), "the moon") .sound(None) // will be silent .show() .expect("unable to toast"); } ``` -------------------------------- ### Add winrt-notification Dependency Source: https://github.com/allenbenz/winrt-notification/blob/main/README.md This snippet shows how to add the winrt-notification crate as a dependency in your Cargo.toml file to use its features in your Rust project. ```toml #Cargo.toml [dependencies] winrt-notification = "0.5.1" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.