/// This function provides an alternative output to the full string returned by fmt::Display.
/// The fmt::Display version is necessary for Serialization, while the abbreviated value is
/// needed for certain command-line conversions. Note that this diverges from Fuchsia's
/// convention of using MiB, KiB, etc. because these abbreviations are intended for legacy
/// compatibility with the Qemu and FVM tool command lines.
This function provides an alternative output to the full string returned by fmt::Display.
The fmt::Display version is necessary for Serialization, while the abbreviated value is
needed for certain command-line conversions. Note that this diverges from Fuchsia's
convention of using MiB, KiB, etc. because these abbreviations are intended for legacy
compatibility with the Qemu and FVM tool command lines.
This function provides an alternative output to the full string returned by fmt :: Display . The fmt :: Display version is necessary for Serialization while the abbreviated value is needed for certain command - line conversions . Note that this diverges from Fuchsia ' s convention of using MiB KiB etc . because these abbreviations are intended for legacy compatibility with the Qemu and FVM tool command lines .
pub fn abbreviate(&self) -> &str {
        match self {
            DataUnits::Bytes => "",
            DataUnits::Kilobytes => "K",
            DataUnits::Megabytes => "M",
            DataUnits::Gigabytes => "G",
            DataUnits::Terabytes => "T",
        }
    }
pub fn abbreviate ( & self ) -> & str { match self { DataUnits :: Bytes => " " , DataUnits :: Kilobytes => " " , DataUnits :: Megabytes => " " , DataUnits :: Gigabytes => " " , DataUnits :: Terabytes => " " , } }
This function provides an alternative output to the full string returned by fmt::Display.
This function provides an alternative output to the full string returned by fmt :: Display .
&self