simplebyteunit

Crates.iosimplebyteunit
lib.rssimplebyteunit
version0.3.0
created_at2023-09-27 05:38:20.231988+00
updated_at2025-07-19 22:50:00.172435+00
descriptionA thin encapsulate for integer primitives to facilitate a fast, simple, yet ergonomic byteunit implementation.
homepage
repositoryhttps://github.com/sapphirusberyl/simplebyteunit
max_upload_size
id984297
size36,803
Xavier Moffett (SapphirusBeryl)

documentation

README

SimpleByteUnit Build Workflow

SimpleByteUnit is a crate which provides a thin encapsulate for integer primitives to facilitate a fast, simple, yet ergonomic byteunit implementation.

Usage

Add 'simplebyteunit' to your 'Cargo.toml':

[dependencies]
simplebyteunit = "0.3.0"

Example

Generate a human-readable, formatted ByteUnit:

use simplebyteunit::simplebyteunit::*;

let byteunit_var = 500000.to_byteunit(SI);

println!("{byteunit_var}");

Output:

500 kB
Commit count: 13

cargo fmt