ISO 3166 Static Data
This crate provides a generated enumeration for use as an ISO 3166-1 code enum, and some wrapper types with more strict conventions. This crate is both no-std and no-alloc (with no need/desire to enable them), and supports serde via the "serde" feature.
There are three primary objects in this crate:
Numeric- The ISO 3166-1 numeric country codes.Alpha2- A newtype wrapper which strictly enforces the use of Alpha2 strings.Alpha3- A newtype wrapper which strictly enforces the use of Alpha3 strings.
Examples
use ;
const USA_ALPHA2: &str = "US";
let alpha2 = from_alpha2.expect;
let alpha3 = from;
let numeric = from;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
use FromStr;
use ;
let USA_ALPHA3: &str = "USA";
let numeric = from_str.expect;
let alpha3 = from;
let alpha2 = from;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;