Expand description
Rust implementation of sizes formatting and parsing, matching zircon/system/ulib/pretty.
Enums§
- Size
Unit - Units for formatting byte sizes.
Constants§
Functions§
- format_
size_ fixed_ rs - Formats |bytes| as a human-readable string like “123.4k”. Units are in powers of 1024, so “K” is technically “kiB”, etc. Values smaller than “K” have the suffix “B”.
- format_
size_ rs - Calls format_size_fixed_rs() with unit=0, picking a natural unit for the size.
- parse_
size_ bytes - Returns the number of bytes represented by a human readable string like “123.4k”, 123.4 * 1024 bytes encoded in |formatted_bytes|.