#byte #numeric #converting #generic #type #value

number-bytes

Provides a simple trait for converting generic numeric types to and from bytes

1 stable release

1.0.1 Feb 2, 2025

#1783 in Rust patterns

Download history 133/week @ 2025-01-27 111/week @ 2025-02-03

244 downloads per month

MIT/Apache

9KB
132 lines

number-bytes

Rust library that provides a simple trait for converting generic numeric types to and from bytes. Provides the functionality of the to_xx_bytes and from_xx_bytes functions of Rust's numeric types under a trait and a constant value telling how many bytes the type uses.

crates.io | docs.rs

No runtime deps

Features