Crate fmtsize[−][src]
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
ByteSizeFormatter | 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….” |
Traits
FmtSize | Allows formatting of integral values (u64) as human-readable sizes. |
Format | Used to format values in accordance with some set of named sizes and constants. |