dinero 0.0.4

Dinero lets you express monetary values. You can perform mutations, conversions, comparisons, format them extensively, and overall make money manipulation in your application easier and safer.
Documentation
dinero-0.0.4 has been yanked.

📦 Install

$ cargo add dinero

⚡️ Quick start

Dinero objects are minimal. The API is heavily inspired by dinero.js unless there is a more suitable Rust way to implement things.

use dinero::{api::add, currencies::USD, Dinero};

fn main() {
    let d1 = Dinero::new(500, USD, None);
    let d2 = Dinero::new(800, USD, None);

    let result = add(&d1, &d2);
}

🦀 Disclaimer

I'm using this project to learn about Rust. And I'm working my way through the language and the ecosystem.

Consider the current version of Dinero unstable. There will definitely be breaking changes.

📜 License

MIT