ISO 3166 is a standard published by the International Organization for Standardization (ISO) that defines codes for the names of countries, dependent territories, special areas of geographical interest, and their principal subdivisions (e.g., provinces or states). The official name of the standard is Codes for the representation of names of countries and their subdivisions.
For some reason, in WebAssembly builds the fields of CountryCode become private and instead have getter methods (so instead of .name you have to use .name()). I thought I was going crazy for a while because this is obviously not visible in the docs!
Is there a reason for this? This means that if the same code using this library is used in a wasm and a native application, it has to be feature gated to access fields in a different way, or do some kind of workaround with maybe a trait over the CountryCode field.
Some of the country names are polluted by Wikipedia footnotes. For example, Afghanistan and Cyprus have their English names listed by this library as Afghanistan[b] and Cyprus[b] due to a footnote linking to naming disputes.
As I understand, the largest numeric is 999. Furthermore, there are no negative numerics. What's the rationale for choosing i32 here? It seems like u16 would be a more appropriate fit.