| Crates.io | ucon |
| lib.rs | ucon |
| version | 0.1.1 |
| created_at | 2024-11-15 04:51:13.953328+00 |
| updated_at | 2024-11-15 05:44:11.107494+00 |
| description | A simple unit conversion library |
| homepage | https://keiran.cc/ucon |
| repository | https://github.com/KeiranScript/ucon |
| max_upload_size | |
| id | 1448656 |
| size | 20,048 |
Unit conversion in Rust has never been easier.
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);
}