Skip to main content

Crate memory_size

Crate memory_size 

Source
Expand description

This crate provides the MemorySize type, a wrapper around a memory size represented in bits. It supports basic arithmetic operations and pretty-printing in human-readable formats.

§Usage Example

use memory_size::MemorySize;

// Create a MemorySize from bytes
let size = MemorySize::from_bytes(1024);
println!("Size: {}", size); // prints "1.00 KB" (depending on the chosen format)

Structs§

MemorySize
This struct represents the size of an area of memory The maximum size possible to be represented is u64::MAX bits (approximately 2.3 exabytes)