sizes

Crates.iosizes
lib.rssizes
version0.1.3
sourcesrc
created_at2023-10-27 20:39:41.809007
updated_at2023-10-27 20:48:43.07777
descriptionA crate to format byte sizes
homepagehttps://crates.io/crates/sizes
repositoryhttps://gitlab.com/xdevs23/crate-sizes
max_upload_size
id1016443
size5,700
Simão Gomes Viana (xdevs23)

documentation

https://docs.rs/sizes

README

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

cargo fmt