rusty_money now supports defining your own currencies and has a cryptocurrency module. It no longer depends on lazy_static!,
is a bit faster and and simpler to use. Many breaking changes were needed to support this, so upgrade with care!
- define_currency_set! allows you to create your own custom currency modules. @jimpo
- CryptoCurrencies (Bitcoin, Ethereum) are now available in the
crypto
module. - Removed dependency on lazy_static! and made library thread safe.
Breaking Changes:
Money::new
was deprecated, please useMoney::from_minor
instead.Money::from_str()
accepts a currency referenceiso::USD
instead of string"USD"
.Money
requires lifetime and currency type annotiations.money!
macro was deprecated, please useMoney::from_str
instead.Currency::get()
was deprecated, please reference currencies directly by their module likeiso::USD
.- The old Currency module is now called
iso::Currency
. Currency::from_string
is nowiso::find
and accepts&str
instead ofString
@ObsceneGiraffe.ExchangeRate::add_or_update_rate
was deprecated, please useExchangeRate::set_rate
instead. @jimpo.