| Crates.io | repr-size |
| lib.rs | repr-size |
| version | 0.1.2 |
| created_at | 2022-05-18 20:53:15.256251+00 |
| updated_at | 2022-05-19 12:59:03.589664+00 |
| description | Ergonomic functions to display a count of bytes to an end user. |
| homepage | |
| repository | https://github.com/tyush/repr-bytes |
| max_upload_size | |
| id | 589237 |
| size | 8,899 |
Small, simple library to convert byte amounts to pretty, human readable sizes.
let my_file_size = Size::from(54222);
println!("{}", my_file_size); // "54.2 KB"
println!("{}", my_file_size.to_si_string()); // "53.0 KiB"
println!("{}", my_file_size.repr(Units::Bytes)); // "54222 B"
serde - enables serialization/deserialization of Size <-> usize