memsize 0.1.4

Memory unit sizes
Documentation
  • Coverage
  • 9.38%
    3 out of 32 items documented0 out of 3 items with examples
  • Size
  • Source code size: 8.61 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.72 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 11s Average build duration of successful builds.
  • all releases: 11s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • austinkeeley/memsize
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • austinkeeley

memsize

Rust constants and functions for dealing with memory unit sizes.

Constants

Includes the following constants representing the "traditional" memory unit sizes, e.g. 1 kilobyte == 1024 bytes.

BYTE_SIZE
KILOBYTE_SIZE
MEGABYTE_SIZE
GIGABYTE_SIZE
TERABYTE_SIZE
PETABYTE_SIZE
EXABYTE_SIZE
ZETTABYTE_SIZE
YOTTABYTE_SIZE

Additionally, the following constants are also included for the metric decimal interpretations of memory unit sizes, e.g. 1 kilobyte == 1000 bytes.

DECIMAL_BYTE_SIZE
DECIMAL_KILOBYTE_SIZE
DECIMAL_MEGABYTE_SIZE
DECIMAL_GIGABYTE_SIZE
DECIMAL_TERABYTE_SIZE
DECIMAL_PETABYTE_SIZE
DECIMAL_EXABYTE_SIZE
DECIMAL_ZETTABYTE_SIZE
DECIMAL_YOTTABYTE_SIZE

Enums

pub enum MemoryUnit {
    Byte,
    Kilobyte,
    Megabyte,
    Gigabyte,
    Terabyte,
    Petabyte,
    Exabyte,
    Zettabyte,
    Yottabyte,
}