| Crates.io | show-option |
| lib.rs | show-option |
| version | 0.2.0 |
| created_at | 2023-09-07 03:41:21.927535+00 |
| updated_at | 2025-01-31 05:24:03.894631+00 |
| description | Library for displaying Options |
| homepage | https://github.com/kriomant/show-option |
| repository | https://github.com/kriomant/show-option.git |
| max_upload_size | |
| id | 965852 |
| size | 16,162 |
Rust library for diplaying Options.
use show_option::prelude::*;
println!("received bytes: {}", None::<usize>.show_or("none")); // "received bytes: none"
println!("amount: {}", Some(20).show_prefixed_or("$", "-")); // "amount: $20"
println!("amount: {}", format_option!(Some(20), "${}", "-")); // "amount: $20"