bcmyers / num-format

A Rust crate for producing string representations of numbers, formatted according to international standards
Apache License 2.0
123 stars 22 forks source link

Type wrapper? #46

Open ciphergoth opened 7 months ago

ciphergoth commented 7 months ago

It would be convenient to be able to call println with formatted numbers without pre-serializing them. Might some sort of type wrapper implementing the Display trait work well? Then we could write something like:

println!("We have {} subscribers", num_format::Wrapper::wrapped(&num_format::Locale::en, subscriber_count));