This package contains an implementation of the ISO 4217 Currency Codes specification.
For notes on the design of the API, see the repository README.
```rust use codesiso4217::{CurrencyCode, ISO_4217};
let code = CurrencyCode::BZD;
asserteq!(code.alphacode(), "BZD"); asserteq!(code.numericcode(), Some(84)); asserteq!(code.currencyname(), "Belize Dollar"); asserteq!(code.countryname(), "BELIZE"); asserteq!(code.isfund(), false); asserteq!(code.ishistorical(), false); asserteq!(code.withdrawaldate(), None);
asserteq!(ISO4217.title(), "Currency codes"); ```
By default only the serde
feature is enabled, the [CurrencyCode::alphacode] and
[CurrencyCode::numericcode] methods cannot be excluded.
serde
- Enables serialization of the [CurrencyCode] type.currency_name
- Adds the [CurrencyCode::currency_name] method.country_name
- Adds the [CurrencyCode::country_name] method.monetary_units
- Adds the [CurrencyCode::monetary_units] method.is_fund
- Adds the [CurrencyCode::is_fund] method.historical_codes
- Adds the [CurrencyCode::ishistorical] and [CurrencyCode::withdrawaldate] methods.Version 0.1.3
codes-common
Code
trait and macro-created implementation.Version 0.1.2
Code
trait.Version 0.1.1
CurrencyCode
type and
methods. Took heavy inspiration from
penny but wanted a different resulting style.Version 0.1.0