show-option

Crates.ioshow-option
lib.rsshow-option
version0.1.0
sourcesrc
created_at2023-09-07 03:41:21.927535
updated_at2023-09-07 03:41:21.927535
descriptionLibrary for displaying Options
homepagehttps://github.com/kriomant/show-option
repositoryhttps://github.com/kriomant/show-option.git
max_upload_size
id965852
size15,416
Mikhail Trishchenkov (kriomant)

documentation

https://docs.rs/show-option

README

Rust library for diplaying Options.

Usage

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"
Commit count: 3

cargo fmt