ISO 4217 Static Data
This crate provides generated ISO 4217 data. The primary point is the [Currency] enum, which contains enumrated values for the distributed currencies.
Examples
The enumeration can be created from the three-character currency code:
use Currency;
use FromStr;
const CURRENCY: &str = "USD";
let actual = from_str.expect;
assert_eq!;
assert_eq!;
Numeric codes are also supported:
use Currency;
use FromStr;
const CURRENCY: u16 = 840;
let actual = try_from.expect;
assert_eq!;
assert_eq!;
There are also methods to get the universal currency for a given country (if the country has one):
use Alpha2;
use Currency;
use FromStr;
let actual = try_from.expect;
assert_eq!;