Expand description
§fmtsize
fmtsize
provides human-readable formatting for things like file sizes. It
attempts to find the largest shorthand size possible for a given value,
although it’s limited to “gigabytes.” Someday we may upgrade to terabytes. :)
println!("{}", 492_752_310_u64.fmt_size(Conventional)); // 469.93 MB
Structs§
- Byte
Size Formatter - Lazy memory size formatter.
- Conventional
- Old-school formatting: a megabyte is 1024 kilobytes, dammit!
- Decimal
- Nonsense formatting. “That hard drive is totally 1 TB! You’re thinking of a TiB, which is totally different….”