Countries list from ISO 3166-1
After cargo install countries-tools
:
```rust use countries_tools::{Country, CountryAlpha2};
asserteq!(Country::from(CountryAlpha2::ES).shortname(), "Spain"); ```
```rust use countries_tools::{Country, CountryAlpha3};
asserteq!(Country::from(CountryAlpha3::USA).shortname(), "United States of America"); ```
```rust use countries_tools::Country;
asserteq!(Country::tryfrom(392).unwrap().short_name(), "Japan"); ```
As much methods as possible are const fn
to allow compile-time computation and optimize runtime performance.
Also this crate is no_std
compatible. The crate size is kept as small as possible and also the impact on the binary size.