ucon 0.1.1

A simple unit conversion library
Documentation
  • Coverage
  • 0%
    0 out of 68 items documented0 out of 24 items with examples
  • Size
  • Source code size: 19.58 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 4 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 12s Average build duration of successful builds.
  • all releases: 11s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • keirancc

uCON

Unit conversion in Rust has never been easier.

Supported Conversions

  • Length
  • Weight
  • Temperature
  • Volume
  • Time
  • Speed
  • Area
  • Data

Usage

Add the following to your Cargo.toml:

[dependencies]
ucon = "0.1.0"

or add with cargo:

cargo add ucon
use ucon::Length;

fn main() {
    let meter = Length::Meter(1.0);
    let kilometer = meter.convert_to(&Length::Kilometer(0.0)).unwrap();
    println!("{} is {}", meter, kilometer);
}