Create basic library

This commit is contained in:
2024-04-14 20:42:24 -03:00
parent 9185b3a2a8
commit 40489dcd8f
9 changed files with 148 additions and 1 deletions

9
examples/option.rs Normal file
View File

@ -0,0 +1,9 @@
// Copyright (c) Tribufu. All Rights Reserved.
// SPDX-License-Identifier: MIT
use unwrap_gui::*;
fn main() {
let option: Option<()> = None;
option.unwrap_gui();
}

13
examples/result.rs Normal file
View File

@ -0,0 +1,13 @@
// Copyright (c) Tribufu. All Rights Reserved.
// SPDX-License-Identifier: MIT
use anyhow::{Error, Result};
use unwrap_gui::*;
fn main() {
let result: Result<()> = Err(Error::msg(
"With this trait you can display a message and exit the app.",
));
result.unwrap_gui();
}