Skip to main content

format_bytes

Function format_bytes 

Source
pub fn format_bytes(bytes: u64, units: ByteUnits) -> String
Expand description

Renders a byte count such as 2.6 GiB.

Uses one decimal below 10 and none above, so the digit count never exceeds three and the column width stays stable across unit boundaries.