Function apollo_framework::fmt::format_bytes[][src]

pub fn format_bytes(size_in_bytes: usize, f: &mut dyn Write) -> Result

Formats a given size in bytes.

This function determines the ideal unit (ranging from bytes to petabytes) to provide a concise representation.

Note that a helper function format_size is also provided which directly returns a String. This function also provides some examples.