#byte #values #strongly-typed #enums #version #prettified

yanked pretty-bytes-enum

Strongly-typed prettified byte values

0.1.0 Aug 6, 2023

#71 in #strongly-typed

MIT/Apache

14KB
368 lines

Pretty Bytes Enum

A simple, no-dependencies crate for converting a number of bytes into a strongly-typed representation of the "prettified" version of those bytes.

Compatible with serde! Designed for serializing possibly large byte values into JSON and sending to JavaScript code, since JS doesn't support full u64 values.

Inspired by/derived from https://github.com/sindresorhus/pretty-bytes.


lib.rs:

A simple, no-dependencies crate for converting a number of bytes into a strongly-typed representation of the "prettified" version of those bytes.

Compatible with serde when the serde feature is enabled.

Dependencies

~160KB