mammon_newtype
Mammon is a lightweight, opinionated crate for working with money in Rust.
It provides a newtype wrapper around integer primitives that represent a number at three decimal places.
This is useful for working with currencies that have a fixed number of decimal places, such as the US dollar.
Features
- Newtype wrapper around all integer primtives for representing a number at three decimal places.
- Arithmetic operations between values.
- No standard library dependencies.
Usage
let money = new; // 12.30
let rate = new; // 1.05
println!; // $12.915