2 releases
0.1.1 | Nov 15, 2024 |
---|---|
0.1.0 | Nov 15, 2024 |
#15 in #weight
79 downloads per month
15KB
343 lines
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);
}