Trait memu::MemoryUnit
source · pub trait MemoryUnit {
// Required methods
fn as_bits(&self) -> u128;
fn as_byte(&self) -> Byte;
fn as_kilo_byte(&self) -> KiloByte;
fn as_mega_byte(&self) -> MegaByte;
fn as_giga_byte(&self) -> GigaByte;
fn as_tera_byte(&self) -> TeraByte;
fn as_peta_byte(&self) -> PetaByte;
}Expand description
Trait for converting between memory units.
Required Methods§
sourcefn as_kilo_byte(&self) -> KiloByte
fn as_kilo_byte(&self) -> KiloByte
Converts the unit into KiloBytes.
sourcefn as_mega_byte(&self) -> MegaByte
fn as_mega_byte(&self) -> MegaByte
Converts the unit into MegaBytes.
sourcefn as_giga_byte(&self) -> GigaByte
fn as_giga_byte(&self) -> GigaByte
Converts the unit into GigaBytes.
sourcefn as_tera_byte(&self) -> TeraByte
fn as_tera_byte(&self) -> TeraByte
Converts the unit into TeraBytes.
sourcefn as_peta_byte(&self) -> PetaByte
fn as_peta_byte(&self) -> PetaByte
Converts the unit into PetaBytes.