4 releases
0.1.3 | Oct 27, 2023 |
---|---|
0.1.2 | Oct 27, 2023 |
0.1.1 | Oct 27, 2023 |
0.1.0 | Oct 27, 2023 |
#3 in #mib
6KB
86 lines
sizes
A crate to format byte sizes.
Example
use sizes::{BinarySize};
println!("{}", BinarySize::from(2_u64*1024*1024).rounded());
// Result: 2.00 MiB
use sizes:{BinarySize, YIB};
println!("{}", BinarySize::from(2_u128*YIB));
// Result: 2 YiB