Rusty-Money
rusty_money takes care of calculating, rounding, displaying, and parsing units of money according to ISO 4217 standards.
Example
The easiest way to create Money is by using the flexible money! macro:
use money;
use Money;
let hundred_dollars = money!;
let thousand_dollars = money!;
let hundred_pounds = money!;
Money handles rounding for you based on the properties of the currency:
let usd = money!;
println!; // -$2,000.01
let eur = money!;
println!; // -€2.000,01
You can perform basic operations on money like:
let hundred = money!;
let thousand = money!;
println!; // true
println!; // true
println!; // $1,000.00