capsize 0.1.1

A converter for units of capacity
Documentation

capsize

Build Status

Conversions between units of capacity

docs

Find them here

install

Add the following to your Cargo.toml

[dependencies]
capsize = "0.1.0"

usage

extern crate capsize;

use capize::Capacity;

pub fn main() {
  // get the equivilent number of bytes in 4 megabytes
  let bytes = 4.megabytes();
  println!("4 megabytes is {} bytes", bytes);
  // resolve byte size to the closest human form
  println!(bytes.capacity()); // 4.0K
}

Doug Tangren (softprops) 2015