1个稳定版本

1.0.0 2022年7月28日

值格式化中排名307


dir-meta中使用

Apache-2.0 OR MIT

11KB
158

BytePrefix

Rust crates.io

一个库,用于根据NIST参考常数、单位和不确定度文档中引用的二进制倍数前缀格式化字节

将crate添加到您的crate

$ cargo add byte_prefix

使用方法

    // Import the crate
    use byte_prefix::calc_bytes;

    // The bytes to convert
    let size = 1024usize as f32;

    // Call `calc_bytes()` function passing the `size` as arguments
    let formatted_file_size = calc_bytes(size);

许可协议

此crate根据Apache-2.0MIT许可协议,所有贡献都将采用相同的许可证。

行为准则

所有贡献和讨论都必须遵守Rust行为准则

无运行时依赖