Function win_msgbox::error
source · pub fn error<T>(text: impl Into<PCWSTR>) -> MessageBox<T>Expand description
Creates a new message box where its icon is set to Error.
Examples found in repository?
examples/options.rs (line 5)
4 5 6 7 8 9 10 11 12 13 14 15 16 17
fn main() -> Result<(), WIN32_ERROR> {
let response = win_msgbox::error::<CancelTryAgainContinue>(w!("Couldn't download resource"))
.title(w!("Download Error"))
.show()?;
use CancelTryAgainContinue::*;
match response {
Cancel => println!("Cancelling downlaod..."),
TryAgain => println!("Attempting redownload..."),
Continue => println!("Skipping resource"),
}
Ok(())
}