A thin encapsulate for integer primitives to facilitate a fast, simple, yet ergonomic byteunit implementation.
Go to file
2023-09-30 21:54:12 -04:00
.github/workflows Create rust.yml 2023-09-27 05:49:22 +00:00
src Cleaned up documentation, refactored FromStr impl, and added Debug impl 2023-09-30 21:52:31 -04:00
Cargo.lock Release 0.2.1 2023-09-30 21:54:12 -04:00
Cargo.toml Release 0.2.1 2023-09-30 21:54:12 -04:00
LICENSE LICENSE file 2023-09-27 01:17:05 -04:00
README.md Github actions status badge 2023-09-28 23:42:24 -04:00

Rust

SimpleByteUnit

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.2.0"

Example

Generate a human-readable, formatted ByteUnit:

use simplebyteunit::simplebyteunit::*;

let byteunit_var = 500000.to_byteunit(SI);

println!("{byteunit_var}");

Output:

500 kB