Welcome to nbytes!
The nbytes crate exists to provide compile-time evaluation of various unit conversions to bytes. For example:
nbytes
use nbytes::bytes; assert_eq!(bytes![2; KiB], 2048); assert_eq!(bytes![2; kB], 2000);
License: Apache-2.0