#![allow(missing_docs)]
dataset_enum! {
pub enum IsoCountry {
Andorra => "Andorra",
UnitedArabEmirates => "United Arab Emirates",
Afghanistan => "Afghanistan",
AntiguaAndBarbuda => "Antigua and Barbuda",
Anguilla => "Anguilla",
Albania => "Albania",
Armenia => "Armenia",
Angola => "Angola",
Antarctica => "Antarctica",
Argentina => "Argentina",
AmericanSamoa => "American Samoa",
Austria => "Austria",
Australia => "Australia",
Aruba => "Aruba",
AlandIslands => "Ã…land Islands",
Azerbaijan => "Azerbaijan",
BosniaAndHerzegovina => "Bosnia and Herzegovina",
Barbados => "Barbados",
Bangladesh => "Bangladesh",
Belgium => "Belgium",
BurkinaFaso => "Burkina Faso",
Bulgaria => "Bulgaria",
Bahrain => "Bahrain",
Burundi => "Burundi",
Benin => "Benin",
SaintBarthelemy => "Saint Barthélemy",
Bermuda => "Bermuda",
Brunei => "Brunei Darussalam",
Bolivia => "Bolivia (Plurinational State of)",
BonaireSintEustatiusAndSaba => "Bonaire, Sint Eustatius and Saba",
Brazil => "Brazil",
Bahamas => "Bahamas",
Bhutan => "Bhutan",
BouvetIsland => "Bouvet Island",
Botswana => "Botswana",
Belarus => "Belarus",
Belize => "Belize",
Canada => "Canada",
CocosKeelingIslands => "Cocos (Keeling) Islands",
DemocraticRepublicOfTheCongo => "Democratic Republic of the Congo",
CentralAfricanRepublic => "Central African Republic",
RepublicOfTheCongo => "Congo",
Switzerland => "Switzerland",
CoteDIvoire => "Côte d’Ivoire",
CookIslands => "Cook Islands",
Chile => "Chile",
Cameroon => "Cameroon",
China => "China",
Colombia => "Colombia",
CostaRica => "Costa Rica",
Cuba => "Cuba",
CaboVerde => "Cabo Verde",
Curacao => "Curaçao",
ChristmasIsland => "Christmas Island",
Cyprus => "Cyprus",
Czechia => "Czechia",
Germany => "Germany",
Djibouti => "Djibouti",
Denmark => "Denmark",
Dominica => "Dominica",
DominicanRepublic => "Dominican Republic",
Algeria => "Algeria",
Ecuador => "Ecuador",
Estonia => "Estonia",
Egypt => "Egypt",
WesternSahara => "Western Sahara",
Eritrea => "Eritrea",
Spain => "Spain",
Ethiopia => "Ethiopia",
Finland => "Finland",
Fiji => "Fiji",
FalklandIslands => "Falkland Islands (Malvinas)",
Micronesia => "Micronesia (Federated States of)",
FaroeIslands => "Faroe Islands",
France => "France",
Gabon => "Gabon",
UnitedKingdom => "United Kingdom of Great Britain and Northern Ireland",
Grenada => "Grenada",
Georgia => "Georgia",
FrenchGuiana => "French Guiana",
Guernsey => "Guernsey",
Ghana => "Ghana",
Gibraltar => "Gibraltar",
Greenland => "Greenland",
Gambia => "Gambia",
Guinea => "Guinea",
Guadeloupe => "Guadeloupe",
EquatorialGuinea => "Equatorial Guinea",
Greece => "Greece",
SouthGeorgiaAndTheSouthSandwichIslands => "South Georgia and the South Sandwich Islands",
Guatemala => "Guatemala",
Guam => "Guam",
GuineaBissau => "Guinea-Bissau",
Guyana => "Guyana",
HongKong => "China, Hong Kong Special Administrative Region",
HeardIslandAndMcdonaldIslands => "Heard Island and McDonald Islands",
Honduras => "Honduras",
Croatia => "Croatia",
Haiti => "Haiti",
Hungary => "Hungary",
Indonesia => "Indonesia",
Ireland => "Ireland",
Israel => "Israel",
IsleOfMan => "Isle of Man",
India => "India",
BritishIndianOceanTerritory => "British Indian Ocean Territory",
Iraq => "Iraq",
Iran => "Iran (Islamic Republic of)",
Iceland => "Iceland",
Italy => "Italy",
Jersey => "Jersey",
Jamaica => "Jamaica",
Jordan => "Jordan",
Japan => "Japan",
Kenya => "Kenya",
Kyrgyzstan => "Kyrgyzstan",
Cambodia => "Cambodia",
Kiribati => "Kiribati",
Comoros => "Comoros",
SaintKittsAndNevis => "Saint Kitts and Nevis",
NorthKorea => "Democratic People's Republic of Korea",
SouthKorea => "Republic of Korea",
Kuwait => "Kuwait",
CaymanIslands => "Cayman Islands",
Kazakhstan => "Kazakhstan",
Laos => "Lao People's Democratic Republic",
Lebanon => "Lebanon",
SaintLucia => "Saint Lucia",
Liechtenstein => "Liechtenstein",
SriLanka => "Sri Lanka",
Liberia => "Liberia",
Lesotho => "Lesotho",
Lithuania => "Lithuania",
Luxembourg => "Luxembourg",
Latvia => "Latvia",
Libya => "Libya",
Morocco => "Morocco",
Monaco => "Monaco",
Moldova => "Republic of Moldova",
Montenegro => "Montenegro",
SaintMartinFrenchPart => "Saint Martin (French Part)",
Madagascar => "Madagascar",
MarshallIslands => "Marshall Islands",
NorthMacedonia => "North Macedonia",
Mali => "Mali",
Myanmar => "Myanmar",
Mongolia => "Mongolia",
Macao => "China, Macao Special Administrative Region",
NorthernMarianaIslands => "Northern Mariana Islands",
Martinique => "Martinique",
Mauritania => "Mauritania",
Montserrat => "Montserrat",
Malta => "Malta",
Mauritius => "Mauritius",
Maldives => "Maldives",
Malawi => "Malawi",
Mexico => "Mexico",
Malaysia => "Malaysia",
Mozambique => "Mozambique",
Namibia => "Namibia",
NewCaledonia => "New Caledonia",
Niger => "Niger",
NorfolkIsland => "Norfolk Island",
Nigeria => "Nigeria",
Nicaragua => "Nicaragua",
Netherlands => "Netherlands (Kingdom of the)",
Norway => "Norway",
Nepal => "Nepal",
Nauru => "Naoero",
Niue => "Niue",
NewZealand => "New Zealand",
Oman => "Oman",
Panama => "Panama",
Peru => "Peru",
FrenchPolynesia => "French Polynesia",
PapuaNewGuinea => "Papua New Guinea",
Philippines => "Philippines",
Pakistan => "Pakistan",
Poland => "Poland",
SaintPierreAndMiquelon => "Saint Pierre and Miquelon",
Pitcairn => "Pitcairn",
PuertoRico => "Puerto Rico",
Palestine => "State of Palestine",
Portugal => "Portugal",
Palau => "Palau",
Paraguay => "Paraguay",
Qatar => "Qatar",
Reunion => "Réunion",
Romania => "Romania",
Serbia => "Serbia",
RussianFederation => "Russian Federation",
Rwanda => "Rwanda",
SaudiArabia => "Saudi Arabia",
SolomonIslands => "Solomon Islands",
Seychelles => "Seychelles",
Sudan => "Sudan",
Sweden => "Sweden",
Singapore => "Singapore",
SaintHelena => "Saint Helena",
Slovenia => "Slovenia",
SvalbardAndJanMayenIslands => "Svalbard and Jan Mayen Islands",
Slovakia => "Slovakia",
SierraLeone => "Sierra Leone",
SanMarino => "San Marino",
Senegal => "Senegal",
Somalia => "Somalia",
Suriname => "Suriname",
SouthSudan => "South Sudan",
SaoTomeAndPrincipe => "Sao Tome and Principe",
ElSalvador => "El Salvador",
SintMaarten => "Sint Maarten (Dutch part)",
Syria => "Syrian Arab Republic",
Eswatini => "Eswatini",
TurksAndCaicosIslands => "Turks and Caicos Islands",
Chad => "Chad",
FrenchSouthernTerritories => "French Southern Territories",
Togo => "Togo",
Thailand => "Thailand",
Tajikistan => "Tajikistan",
Tokelau => "Tokelau",
TimorLeste => "Timor-Leste",
Turkmenistan => "Turkmenistan",
Tunisia => "Tunisia",
Tonga => "Tonga",
Turkiye => "Türkiye",
TrinidadAndTobago => "Trinidad and Tobago",
Tuvalu => "Tuvalu",
Taiwan => "Taiwan (Province of China)",
Tanzania => "United Republic of Tanzania",
Ukraine => "Ukraine",
Uganda => "Uganda",
UnitedStatesMinorOutlyingIslands => "United States Minor Outlying Islands",
UnitedStates => "United States of America",
Uruguay => "Uruguay",
Uzbekistan => "Uzbekistan",
VaticanCity => "Holy See",
SaintVincentAndTheGrenadines => "Saint Vincent and the Grenadines",
Venezuela => "Venezuela (Bolivarian Republic of)",
BritishVirginIslands => "British Virgin Islands",
UnitedStatesVirginIslands => "United States Virgin Islands",
Vietnam => "Viet Nam",
Vanuatu => "Vanuatu",
WallisAndFutunaIslands => "Wallis and Futuna Islands",
Samoa => "Samoa",
Yemen => "Yemen",
Mayotte => "Mayotte",
SouthAfrica => "South Africa",
Zambia => "Zambia",
Zimbabwe => "Zimbabwe",
}
}
impl IsoCountry {
#[must_use]
#[allow(clippy::too_many_lines)] pub const fn alpha2(self) -> &'static str {
match self {
Self::Andorra => "AD",
Self::UnitedArabEmirates => "AE",
Self::Afghanistan => "AF",
Self::AntiguaAndBarbuda => "AG",
Self::Anguilla => "AI",
Self::Albania => "AL",
Self::Armenia => "AM",
Self::Angola => "AO",
Self::Antarctica => "AQ",
Self::Argentina => "AR",
Self::AmericanSamoa => "AS",
Self::Austria => "AT",
Self::Australia => "AU",
Self::Aruba => "AW",
Self::AlandIslands => "AX",
Self::Azerbaijan => "AZ",
Self::BosniaAndHerzegovina => "BA",
Self::Barbados => "BB",
Self::Bangladesh => "BD",
Self::Belgium => "BE",
Self::BurkinaFaso => "BF",
Self::Bulgaria => "BG",
Self::Bahrain => "BH",
Self::Burundi => "BI",
Self::Benin => "BJ",
Self::SaintBarthelemy => "BL",
Self::Bermuda => "BM",
Self::Brunei => "BN",
Self::Bolivia => "BO",
Self::BonaireSintEustatiusAndSaba => "BQ",
Self::Brazil => "BR",
Self::Bahamas => "BS",
Self::Bhutan => "BT",
Self::BouvetIsland => "BV",
Self::Botswana => "BW",
Self::Belarus => "BY",
Self::Belize => "BZ",
Self::Canada => "CA",
Self::CocosKeelingIslands => "CC",
Self::DemocraticRepublicOfTheCongo => "CD",
Self::CentralAfricanRepublic => "CF",
Self::RepublicOfTheCongo => "CG",
Self::Switzerland => "CH",
Self::CoteDIvoire => "CI",
Self::CookIslands => "CK",
Self::Chile => "CL",
Self::Cameroon => "CM",
Self::China => "CN",
Self::Colombia => "CO",
Self::CostaRica => "CR",
Self::Cuba => "CU",
Self::CaboVerde => "CV",
Self::Curacao => "CW",
Self::ChristmasIsland => "CX",
Self::Cyprus => "CY",
Self::Czechia => "CZ",
Self::Germany => "DE",
Self::Djibouti => "DJ",
Self::Denmark => "DK",
Self::Dominica => "DM",
Self::DominicanRepublic => "DO",
Self::Algeria => "DZ",
Self::Ecuador => "EC",
Self::Estonia => "EE",
Self::Egypt => "EG",
Self::WesternSahara => "EH",
Self::Eritrea => "ER",
Self::Spain => "ES",
Self::Ethiopia => "ET",
Self::Finland => "FI",
Self::Fiji => "FJ",
Self::FalklandIslands => "FK",
Self::Micronesia => "FM",
Self::FaroeIslands => "FO",
Self::France => "FR",
Self::Gabon => "GA",
Self::UnitedKingdom => "GB",
Self::Grenada => "GD",
Self::Georgia => "GE",
Self::FrenchGuiana => "GF",
Self::Guernsey => "GG",
Self::Ghana => "GH",
Self::Gibraltar => "GI",
Self::Greenland => "GL",
Self::Gambia => "GM",
Self::Guinea => "GN",
Self::Guadeloupe => "GP",
Self::EquatorialGuinea => "GQ",
Self::Greece => "GR",
Self::SouthGeorgiaAndTheSouthSandwichIslands => "GS",
Self::Guatemala => "GT",
Self::Guam => "GU",
Self::GuineaBissau => "GW",
Self::Guyana => "GY",
Self::HongKong => "HK",
Self::HeardIslandAndMcdonaldIslands => "HM",
Self::Honduras => "HN",
Self::Croatia => "HR",
Self::Haiti => "HT",
Self::Hungary => "HU",
Self::Indonesia => "ID",
Self::Ireland => "IE",
Self::Israel => "IL",
Self::IsleOfMan => "IM",
Self::India => "IN",
Self::BritishIndianOceanTerritory => "IO",
Self::Iraq => "IQ",
Self::Iran => "IR",
Self::Iceland => "IS",
Self::Italy => "IT",
Self::Jersey => "JE",
Self::Jamaica => "JM",
Self::Jordan => "JO",
Self::Japan => "JP",
Self::Kenya => "KE",
Self::Kyrgyzstan => "KG",
Self::Cambodia => "KH",
Self::Kiribati => "KI",
Self::Comoros => "KM",
Self::SaintKittsAndNevis => "KN",
Self::NorthKorea => "KP",
Self::SouthKorea => "KR",
Self::Kuwait => "KW",
Self::CaymanIslands => "KY",
Self::Kazakhstan => "KZ",
Self::Laos => "LA",
Self::Lebanon => "LB",
Self::SaintLucia => "LC",
Self::Liechtenstein => "LI",
Self::SriLanka => "LK",
Self::Liberia => "LR",
Self::Lesotho => "LS",
Self::Lithuania => "LT",
Self::Luxembourg => "LU",
Self::Latvia => "LV",
Self::Libya => "LY",
Self::Morocco => "MA",
Self::Monaco => "MC",
Self::Moldova => "MD",
Self::Montenegro => "ME",
Self::SaintMartinFrenchPart => "MF",
Self::Madagascar => "MG",
Self::MarshallIslands => "MH",
Self::NorthMacedonia => "MK",
Self::Mali => "ML",
Self::Myanmar => "MM",
Self::Mongolia => "MN",
Self::Macao => "MO",
Self::NorthernMarianaIslands => "MP",
Self::Martinique => "MQ",
Self::Mauritania => "MR",
Self::Montserrat => "MS",
Self::Malta => "MT",
Self::Mauritius => "MU",
Self::Maldives => "MV",
Self::Malawi => "MW",
Self::Mexico => "MX",
Self::Malaysia => "MY",
Self::Mozambique => "MZ",
Self::Namibia => "NA",
Self::NewCaledonia => "NC",
Self::Niger => "NE",
Self::NorfolkIsland => "NF",
Self::Nigeria => "NG",
Self::Nicaragua => "NI",
Self::Netherlands => "NL",
Self::Norway => "NO",
Self::Nepal => "NP",
Self::Nauru => "NR",
Self::Niue => "NU",
Self::NewZealand => "NZ",
Self::Oman => "OM",
Self::Panama => "PA",
Self::Peru => "PE",
Self::FrenchPolynesia => "PF",
Self::PapuaNewGuinea => "PG",
Self::Philippines => "PH",
Self::Pakistan => "PK",
Self::Poland => "PL",
Self::SaintPierreAndMiquelon => "PM",
Self::Pitcairn => "PN",
Self::PuertoRico => "PR",
Self::Palestine => "PS",
Self::Portugal => "PT",
Self::Palau => "PW",
Self::Paraguay => "PY",
Self::Qatar => "QA",
Self::Reunion => "RE",
Self::Romania => "RO",
Self::Serbia => "RS",
Self::RussianFederation => "RU",
Self::Rwanda => "RW",
Self::SaudiArabia => "SA",
Self::SolomonIslands => "SB",
Self::Seychelles => "SC",
Self::Sudan => "SD",
Self::Sweden => "SE",
Self::Singapore => "SG",
Self::SaintHelena => "SH",
Self::Slovenia => "SI",
Self::SvalbardAndJanMayenIslands => "SJ",
Self::Slovakia => "SK",
Self::SierraLeone => "SL",
Self::SanMarino => "SM",
Self::Senegal => "SN",
Self::Somalia => "SO",
Self::Suriname => "SR",
Self::SouthSudan => "SS",
Self::SaoTomeAndPrincipe => "ST",
Self::ElSalvador => "SV",
Self::SintMaarten => "SX",
Self::Syria => "SY",
Self::Eswatini => "SZ",
Self::TurksAndCaicosIslands => "TC",
Self::Chad => "TD",
Self::FrenchSouthernTerritories => "TF",
Self::Togo => "TG",
Self::Thailand => "TH",
Self::Tajikistan => "TJ",
Self::Tokelau => "TK",
Self::TimorLeste => "TL",
Self::Turkmenistan => "TM",
Self::Tunisia => "TN",
Self::Tonga => "TO",
Self::Turkiye => "TR",
Self::TrinidadAndTobago => "TT",
Self::Tuvalu => "TV",
Self::Taiwan => "TW",
Self::Tanzania => "TZ",
Self::Ukraine => "UA",
Self::Uganda => "UG",
Self::UnitedStatesMinorOutlyingIslands => "UM",
Self::UnitedStates => "US",
Self::Uruguay => "UY",
Self::Uzbekistan => "UZ",
Self::VaticanCity => "VA",
Self::SaintVincentAndTheGrenadines => "VC",
Self::Venezuela => "VE",
Self::BritishVirginIslands => "VG",
Self::UnitedStatesVirginIslands => "VI",
Self::Vietnam => "VN",
Self::Vanuatu => "VU",
Self::WallisAndFutunaIslands => "WF",
Self::Samoa => "WS",
Self::Yemen => "YE",
Self::Mayotte => "YT",
Self::SouthAfrica => "ZA",
Self::Zambia => "ZM",
Self::Zimbabwe => "ZW",
}
}
#[must_use]
#[allow(clippy::too_many_lines)] pub const fn alpha3(self) -> &'static str {
match self {
Self::Andorra => "AND",
Self::UnitedArabEmirates => "ARE",
Self::Afghanistan => "AFG",
Self::AntiguaAndBarbuda => "ATG",
Self::Anguilla => "AIA",
Self::Albania => "ALB",
Self::Armenia => "ARM",
Self::Angola => "AGO",
Self::Antarctica => "ATA",
Self::Argentina => "ARG",
Self::AmericanSamoa => "ASM",
Self::Austria => "AUT",
Self::Australia => "AUS",
Self::Aruba => "ABW",
Self::AlandIslands => "ALA",
Self::Azerbaijan => "AZE",
Self::BosniaAndHerzegovina => "BIH",
Self::Barbados => "BRB",
Self::Bangladesh => "BGD",
Self::Belgium => "BEL",
Self::BurkinaFaso => "BFA",
Self::Bulgaria => "BGR",
Self::Bahrain => "BHR",
Self::Burundi => "BDI",
Self::Benin => "BEN",
Self::SaintBarthelemy => "BLM",
Self::Bermuda => "BMU",
Self::Brunei => "BRN",
Self::Bolivia => "BOL",
Self::BonaireSintEustatiusAndSaba => "BES",
Self::Brazil => "BRA",
Self::Bahamas => "BHS",
Self::Bhutan => "BTN",
Self::BouvetIsland => "BVT",
Self::Botswana => "BWA",
Self::Belarus => "BLR",
Self::Belize => "BLZ",
Self::Canada => "CAN",
Self::CocosKeelingIslands => "CCK",
Self::DemocraticRepublicOfTheCongo => "COD",
Self::CentralAfricanRepublic => "CAF",
Self::RepublicOfTheCongo => "COG",
Self::Switzerland => "CHE",
Self::CoteDIvoire => "CIV",
Self::CookIslands => "COK",
Self::Chile => "CHL",
Self::Cameroon => "CMR",
Self::China => "CHN",
Self::Colombia => "COL",
Self::CostaRica => "CRI",
Self::Cuba => "CUB",
Self::CaboVerde => "CPV",
Self::Curacao => "CUW",
Self::ChristmasIsland => "CXR",
Self::Cyprus => "CYP",
Self::Czechia => "CZE",
Self::Germany => "DEU",
Self::Djibouti => "DJI",
Self::Denmark => "DNK",
Self::Dominica => "DMA",
Self::DominicanRepublic => "DOM",
Self::Algeria => "DZA",
Self::Ecuador => "ECU",
Self::Estonia => "EST",
Self::Egypt => "EGY",
Self::WesternSahara => "ESH",
Self::Eritrea => "ERI",
Self::Spain => "ESP",
Self::Ethiopia => "ETH",
Self::Finland => "FIN",
Self::Fiji => "FJI",
Self::FalklandIslands => "FLK",
Self::Micronesia => "FSM",
Self::FaroeIslands => "FRO",
Self::France => "FRA",
Self::Gabon => "GAB",
Self::UnitedKingdom => "GBR",
Self::Grenada => "GRD",
Self::Georgia => "GEO",
Self::FrenchGuiana => "GUF",
Self::Guernsey => "GGY",
Self::Ghana => "GHA",
Self::Gibraltar => "GIB",
Self::Greenland => "GRL",
Self::Gambia => "GMB",
Self::Guinea => "GIN",
Self::Guadeloupe => "GLP",
Self::EquatorialGuinea => "GNQ",
Self::Greece => "GRC",
Self::SouthGeorgiaAndTheSouthSandwichIslands => "SGS",
Self::Guatemala => "GTM",
Self::Guam => "GUM",
Self::GuineaBissau => "GNB",
Self::Guyana => "GUY",
Self::HongKong => "HKG",
Self::HeardIslandAndMcdonaldIslands => "HMD",
Self::Honduras => "HND",
Self::Croatia => "HRV",
Self::Haiti => "HTI",
Self::Hungary => "HUN",
Self::Indonesia => "IDN",
Self::Ireland => "IRL",
Self::Israel => "ISR",
Self::IsleOfMan => "IMN",
Self::India => "IND",
Self::BritishIndianOceanTerritory => "IOT",
Self::Iraq => "IRQ",
Self::Iran => "IRN",
Self::Iceland => "ISL",
Self::Italy => "ITA",
Self::Jersey => "JEY",
Self::Jamaica => "JAM",
Self::Jordan => "JOR",
Self::Japan => "JPN",
Self::Kenya => "KEN",
Self::Kyrgyzstan => "KGZ",
Self::Cambodia => "KHM",
Self::Kiribati => "KIR",
Self::Comoros => "COM",
Self::SaintKittsAndNevis => "KNA",
Self::NorthKorea => "PRK",
Self::SouthKorea => "KOR",
Self::Kuwait => "KWT",
Self::CaymanIslands => "CYM",
Self::Kazakhstan => "KAZ",
Self::Laos => "LAO",
Self::Lebanon => "LBN",
Self::SaintLucia => "LCA",
Self::Liechtenstein => "LIE",
Self::SriLanka => "LKA",
Self::Liberia => "LBR",
Self::Lesotho => "LSO",
Self::Lithuania => "LTU",
Self::Luxembourg => "LUX",
Self::Latvia => "LVA",
Self::Libya => "LBY",
Self::Morocco => "MAR",
Self::Monaco => "MCO",
Self::Moldova => "MDA",
Self::Montenegro => "MNE",
Self::SaintMartinFrenchPart => "MAF",
Self::Madagascar => "MDG",
Self::MarshallIslands => "MHL",
Self::NorthMacedonia => "MKD",
Self::Mali => "MLI",
Self::Myanmar => "MMR",
Self::Mongolia => "MNG",
Self::Macao => "MAC",
Self::NorthernMarianaIslands => "MNP",
Self::Martinique => "MTQ",
Self::Mauritania => "MRT",
Self::Montserrat => "MSR",
Self::Malta => "MLT",
Self::Mauritius => "MUS",
Self::Maldives => "MDV",
Self::Malawi => "MWI",
Self::Mexico => "MEX",
Self::Malaysia => "MYS",
Self::Mozambique => "MOZ",
Self::Namibia => "NAM",
Self::NewCaledonia => "NCL",
Self::Niger => "NER",
Self::NorfolkIsland => "NFK",
Self::Nigeria => "NGA",
Self::Nicaragua => "NIC",
Self::Netherlands => "NLD",
Self::Norway => "NOR",
Self::Nepal => "NPL",
Self::Nauru => "NRU",
Self::Niue => "NIU",
Self::NewZealand => "NZL",
Self::Oman => "OMN",
Self::Panama => "PAN",
Self::Peru => "PER",
Self::FrenchPolynesia => "PYF",
Self::PapuaNewGuinea => "PNG",
Self::Philippines => "PHL",
Self::Pakistan => "PAK",
Self::Poland => "POL",
Self::SaintPierreAndMiquelon => "SPM",
Self::Pitcairn => "PCN",
Self::PuertoRico => "PRI",
Self::Palestine => "PSE",
Self::Portugal => "PRT",
Self::Palau => "PLW",
Self::Paraguay => "PRY",
Self::Qatar => "QAT",
Self::Reunion => "REU",
Self::Romania => "ROU",
Self::Serbia => "SRB",
Self::RussianFederation => "RUS",
Self::Rwanda => "RWA",
Self::SaudiArabia => "SAU",
Self::SolomonIslands => "SLB",
Self::Seychelles => "SYC",
Self::Sudan => "SDN",
Self::Sweden => "SWE",
Self::Singapore => "SGP",
Self::SaintHelena => "SHN",
Self::Slovenia => "SVN",
Self::SvalbardAndJanMayenIslands => "SJM",
Self::Slovakia => "SVK",
Self::SierraLeone => "SLE",
Self::SanMarino => "SMR",
Self::Senegal => "SEN",
Self::Somalia => "SOM",
Self::Suriname => "SUR",
Self::SouthSudan => "SSD",
Self::SaoTomeAndPrincipe => "STP",
Self::ElSalvador => "SLV",
Self::SintMaarten => "SXM",
Self::Syria => "SYR",
Self::Eswatini => "SWZ",
Self::TurksAndCaicosIslands => "TCA",
Self::Chad => "TCD",
Self::FrenchSouthernTerritories => "ATF",
Self::Togo => "TGO",
Self::Thailand => "THA",
Self::Tajikistan => "TJK",
Self::Tokelau => "TKL",
Self::TimorLeste => "TLS",
Self::Turkmenistan => "TKM",
Self::Tunisia => "TUN",
Self::Tonga => "TON",
Self::Turkiye => "TUR",
Self::TrinidadAndTobago => "TTO",
Self::Tuvalu => "TUV",
Self::Taiwan => "TWN",
Self::Tanzania => "TZA",
Self::Ukraine => "UKR",
Self::Uganda => "UGA",
Self::UnitedStatesMinorOutlyingIslands => "UMI",
Self::UnitedStates => "USA",
Self::Uruguay => "URY",
Self::Uzbekistan => "UZB",
Self::VaticanCity => "VAT",
Self::SaintVincentAndTheGrenadines => "VCT",
Self::Venezuela => "VEN",
Self::BritishVirginIslands => "VGB",
Self::UnitedStatesVirginIslands => "VIR",
Self::Vietnam => "VNM",
Self::Vanuatu => "VUT",
Self::WallisAndFutunaIslands => "WLF",
Self::Samoa => "WSM",
Self::Yemen => "YEM",
Self::Mayotte => "MYT",
Self::SouthAfrica => "ZAF",
Self::Zambia => "ZMB",
Self::Zimbabwe => "ZWE",
}
}
#[must_use]
#[allow(clippy::too_many_lines)] pub const fn numeric_code(self) -> &'static str {
match self {
Self::Andorra => "020",
Self::UnitedArabEmirates => "784",
Self::Afghanistan => "004",
Self::AntiguaAndBarbuda => "028",
Self::Anguilla => "660",
Self::Albania => "008",
Self::Armenia => "051",
Self::Angola => "024",
Self::Antarctica => "010",
Self::Argentina => "032",
Self::AmericanSamoa => "016",
Self::Austria => "040",
Self::Australia => "036",
Self::Aruba => "533",
Self::AlandIslands => "248",
Self::Azerbaijan => "031",
Self::BosniaAndHerzegovina => "070",
Self::Barbados => "052",
Self::Bangladesh => "050",
Self::Belgium => "056",
Self::BurkinaFaso => "854",
Self::Bulgaria => "100",
Self::Bahrain => "048",
Self::Burundi => "108",
Self::Benin => "204",
Self::SaintBarthelemy => "652",
Self::Bermuda => "060",
Self::Brunei => "096",
Self::Bolivia => "068",
Self::BonaireSintEustatiusAndSaba => "535",
Self::Brazil => "076",
Self::Bahamas => "044",
Self::Bhutan => "064",
Self::BouvetIsland => "074",
Self::Botswana => "072",
Self::Belarus => "112",
Self::Belize => "084",
Self::Canada => "124",
Self::CocosKeelingIslands => "166",
Self::DemocraticRepublicOfTheCongo => "180",
Self::CentralAfricanRepublic => "140",
Self::RepublicOfTheCongo => "178",
Self::Switzerland => "756",
Self::CoteDIvoire => "384",
Self::CookIslands => "184",
Self::Chile => "152",
Self::Cameroon => "120",
Self::China => "156",
Self::Colombia => "170",
Self::CostaRica => "188",
Self::Cuba => "192",
Self::CaboVerde => "132",
Self::Curacao => "531",
Self::ChristmasIsland => "162",
Self::Cyprus => "196",
Self::Czechia => "203",
Self::Germany => "276",
Self::Djibouti => "262",
Self::Denmark => "208",
Self::Dominica => "212",
Self::DominicanRepublic => "214",
Self::Algeria => "012",
Self::Ecuador => "218",
Self::Estonia => "233",
Self::Egypt => "818",
Self::WesternSahara => "732",
Self::Eritrea => "232",
Self::Spain => "724",
Self::Ethiopia => "231",
Self::Finland => "246",
Self::Fiji => "242",
Self::FalklandIslands => "238",
Self::Micronesia => "583",
Self::FaroeIslands => "234",
Self::France => "250",
Self::Gabon => "266",
Self::UnitedKingdom => "826",
Self::Grenada => "308",
Self::Georgia => "268",
Self::FrenchGuiana => "254",
Self::Guernsey => "831",
Self::Ghana => "288",
Self::Gibraltar => "292",
Self::Greenland => "304",
Self::Gambia => "270",
Self::Guinea => "324",
Self::Guadeloupe => "312",
Self::EquatorialGuinea => "226",
Self::Greece => "300",
Self::SouthGeorgiaAndTheSouthSandwichIslands => "239",
Self::Guatemala => "320",
Self::Guam => "316",
Self::GuineaBissau => "624",
Self::Guyana => "328",
Self::HongKong => "344",
Self::HeardIslandAndMcdonaldIslands => "334",
Self::Honduras => "340",
Self::Croatia => "191",
Self::Haiti => "332",
Self::Hungary => "348",
Self::Indonesia => "360",
Self::Ireland => "372",
Self::Israel => "376",
Self::IsleOfMan => "833",
Self::India => "356",
Self::BritishIndianOceanTerritory => "086",
Self::Iraq => "368",
Self::Iran => "364",
Self::Iceland => "352",
Self::Italy => "380",
Self::Jersey => "832",
Self::Jamaica => "388",
Self::Jordan => "400",
Self::Japan => "392",
Self::Kenya => "404",
Self::Kyrgyzstan => "417",
Self::Cambodia => "116",
Self::Kiribati => "296",
Self::Comoros => "174",
Self::SaintKittsAndNevis => "659",
Self::NorthKorea => "408",
Self::SouthKorea => "410",
Self::Kuwait => "414",
Self::CaymanIslands => "136",
Self::Kazakhstan => "398",
Self::Laos => "418",
Self::Lebanon => "422",
Self::SaintLucia => "662",
Self::Liechtenstein => "438",
Self::SriLanka => "144",
Self::Liberia => "430",
Self::Lesotho => "426",
Self::Lithuania => "440",
Self::Luxembourg => "442",
Self::Latvia => "428",
Self::Libya => "434",
Self::Morocco => "504",
Self::Monaco => "492",
Self::Moldova => "498",
Self::Montenegro => "499",
Self::SaintMartinFrenchPart => "663",
Self::Madagascar => "450",
Self::MarshallIslands => "584",
Self::NorthMacedonia => "807",
Self::Mali => "466",
Self::Myanmar => "104",
Self::Mongolia => "496",
Self::Macao => "446",
Self::NorthernMarianaIslands => "580",
Self::Martinique => "474",
Self::Mauritania => "478",
Self::Montserrat => "500",
Self::Malta => "470",
Self::Mauritius => "480",
Self::Maldives => "462",
Self::Malawi => "454",
Self::Mexico => "484",
Self::Malaysia => "458",
Self::Mozambique => "508",
Self::Namibia => "516",
Self::NewCaledonia => "540",
Self::Niger => "562",
Self::NorfolkIsland => "574",
Self::Nigeria => "566",
Self::Nicaragua => "558",
Self::Netherlands => "528",
Self::Norway => "578",
Self::Nepal => "524",
Self::Nauru => "520",
Self::Niue => "570",
Self::NewZealand => "554",
Self::Oman => "512",
Self::Panama => "591",
Self::Peru => "604",
Self::FrenchPolynesia => "258",
Self::PapuaNewGuinea => "598",
Self::Philippines => "608",
Self::Pakistan => "586",
Self::Poland => "616",
Self::SaintPierreAndMiquelon => "666",
Self::Pitcairn => "612",
Self::PuertoRico => "630",
Self::Palestine => "275",
Self::Portugal => "620",
Self::Palau => "585",
Self::Paraguay => "600",
Self::Qatar => "634",
Self::Reunion => "638",
Self::Romania => "642",
Self::Serbia => "688",
Self::RussianFederation => "643",
Self::Rwanda => "646",
Self::SaudiArabia => "682",
Self::SolomonIslands => "090",
Self::Seychelles => "690",
Self::Sudan => "729",
Self::Sweden => "752",
Self::Singapore => "702",
Self::SaintHelena => "654",
Self::Slovenia => "705",
Self::SvalbardAndJanMayenIslands => "744",
Self::Slovakia => "703",
Self::SierraLeone => "694",
Self::SanMarino => "674",
Self::Senegal => "686",
Self::Somalia => "706",
Self::Suriname => "740",
Self::SouthSudan => "728",
Self::SaoTomeAndPrincipe => "678",
Self::ElSalvador => "222",
Self::SintMaarten => "534",
Self::Syria => "760",
Self::Eswatini => "748",
Self::TurksAndCaicosIslands => "796",
Self::Chad => "148",
Self::FrenchSouthernTerritories => "260",
Self::Togo => "768",
Self::Thailand => "764",
Self::Tajikistan => "762",
Self::Tokelau => "772",
Self::TimorLeste => "626",
Self::Turkmenistan => "795",
Self::Tunisia => "788",
Self::Tonga => "776",
Self::Turkiye => "792",
Self::TrinidadAndTobago => "780",
Self::Tuvalu => "798",
Self::Taiwan => "158",
Self::Tanzania => "834",
Self::Ukraine => "804",
Self::Uganda => "800",
Self::UnitedStatesMinorOutlyingIslands => "581",
Self::UnitedStates => "840",
Self::Uruguay => "858",
Self::Uzbekistan => "860",
Self::VaticanCity => "336",
Self::SaintVincentAndTheGrenadines => "670",
Self::Venezuela => "862",
Self::BritishVirginIslands => "092",
Self::UnitedStatesVirginIslands => "850",
Self::Vietnam => "704",
Self::Vanuatu => "548",
Self::WallisAndFutunaIslands => "876",
Self::Samoa => "882",
Self::Yemen => "887",
Self::Mayotte => "175",
Self::SouthAfrica => "710",
Self::Zambia => "894",
Self::Zimbabwe => "716",
}
}
#[must_use]
pub fn from_alpha2(code: &str) -> Option<Self> {
Self::ALL
.iter()
.copied()
.find(|country| country.alpha2().eq_ignore_ascii_case(code))
}
#[must_use]
pub fn from_alpha3(code: &str) -> Option<Self> {
Self::ALL
.iter()
.copied()
.find(|country| country.alpha3().eq_ignore_ascii_case(code))
}
#[must_use]
pub fn from_numeric_code(code: &str) -> Option<Self> {
Self::ALL
.iter()
.copied()
.find(|country| country.numeric_code() == code)
}
}
impl super::Country {
#[must_use]
#[allow(clippy::too_many_lines)] pub const fn iso_country(self) -> Option<IsoCountry> {
match self {
Self::Afghanistan => Some(IsoCountry::Afghanistan),
Self::Albania => Some(IsoCountry::Albania),
Self::Algeria => Some(IsoCountry::Algeria),
Self::Andorra => Some(IsoCountry::Andorra),
Self::Angola => Some(IsoCountry::Angola),
Self::AntiguaAndDeps => Some(IsoCountry::AntiguaAndBarbuda),
Self::Argentina => Some(IsoCountry::Argentina),
Self::Armenia => Some(IsoCountry::Armenia),
Self::Australia => Some(IsoCountry::Australia),
Self::Austria => Some(IsoCountry::Austria),
Self::Azerbaijan => Some(IsoCountry::Azerbaijan),
Self::Bahamas => Some(IsoCountry::Bahamas),
Self::Bahrain => Some(IsoCountry::Bahrain),
Self::Bangladesh => Some(IsoCountry::Bangladesh),
Self::Barbados => Some(IsoCountry::Barbados),
Self::Belarus => Some(IsoCountry::Belarus),
Self::Belgium => Some(IsoCountry::Belgium),
Self::Belize => Some(IsoCountry::Belize),
Self::Benin => Some(IsoCountry::Benin),
Self::Bhutan => Some(IsoCountry::Bhutan),
Self::Bolivia => Some(IsoCountry::Bolivia),
Self::BosniaHerzegovina => Some(IsoCountry::BosniaAndHerzegovina),
Self::Botswana => Some(IsoCountry::Botswana),
Self::Brazil => Some(IsoCountry::Brazil),
Self::Brunei => Some(IsoCountry::Brunei),
Self::Bulgaria => Some(IsoCountry::Bulgaria),
Self::Burkina => Some(IsoCountry::BurkinaFaso),
Self::Burundi => Some(IsoCountry::Burundi),
Self::Cambodia => Some(IsoCountry::Cambodia),
Self::Cameroon => Some(IsoCountry::Cameroon),
Self::Canada => Some(IsoCountry::Canada),
Self::CapeVerde => Some(IsoCountry::CaboVerde),
Self::CentralAfricanRepublic => Some(IsoCountry::CentralAfricanRepublic),
Self::Chad => Some(IsoCountry::Chad),
Self::Chile => Some(IsoCountry::Chile),
Self::China => Some(IsoCountry::China),
Self::Colombia => Some(IsoCountry::Colombia),
Self::Comoros => Some(IsoCountry::Comoros),
Self::RepublicOfTheCongo => Some(IsoCountry::RepublicOfTheCongo),
Self::DemocraticRepublicOfTheCongo => Some(IsoCountry::DemocraticRepublicOfTheCongo),
Self::CostaRica => Some(IsoCountry::CostaRica),
Self::Croatia => Some(IsoCountry::Croatia),
Self::Cuba => Some(IsoCountry::Cuba),
Self::Cyprus => Some(IsoCountry::Cyprus),
Self::CzechRepublic => Some(IsoCountry::Czechia),
Self::Denmark => Some(IsoCountry::Denmark),
Self::Djibouti => Some(IsoCountry::Djibouti),
Self::Dominica => Some(IsoCountry::Dominica),
Self::DominicanRepublic => Some(IsoCountry::DominicanRepublic),
Self::EastTimor => Some(IsoCountry::TimorLeste),
Self::Ecuador => Some(IsoCountry::Ecuador),
Self::Egypt => Some(IsoCountry::Egypt),
Self::ElSalvador => Some(IsoCountry::ElSalvador),
Self::EquatorialGuinea => Some(IsoCountry::EquatorialGuinea),
Self::Eritrea => Some(IsoCountry::Eritrea),
Self::Estonia => Some(IsoCountry::Estonia),
Self::Ethiopia => Some(IsoCountry::Ethiopia),
Self::Fiji => Some(IsoCountry::Fiji),
Self::Finland => Some(IsoCountry::Finland),
Self::France => Some(IsoCountry::France),
Self::Gabon => Some(IsoCountry::Gabon),
Self::Gambia => Some(IsoCountry::Gambia),
Self::Georgia => Some(IsoCountry::Georgia),
Self::Germany => Some(IsoCountry::Germany),
Self::Ghana => Some(IsoCountry::Ghana),
Self::Greece => Some(IsoCountry::Greece),
Self::Grenada => Some(IsoCountry::Grenada),
Self::Guatemala => Some(IsoCountry::Guatemala),
Self::Guinea => Some(IsoCountry::Guinea),
Self::GuineaBissau => Some(IsoCountry::GuineaBissau),
Self::Guyana => Some(IsoCountry::Guyana),
Self::Haiti => Some(IsoCountry::Haiti),
Self::Honduras => Some(IsoCountry::Honduras),
Self::Hungary => Some(IsoCountry::Hungary),
Self::Iceland => Some(IsoCountry::Iceland),
Self::India => Some(IsoCountry::India),
Self::Indonesia => Some(IsoCountry::Indonesia),
Self::Iran => Some(IsoCountry::Iran),
Self::Iraq => Some(IsoCountry::Iraq),
Self::RepublicOfIreland => Some(IsoCountry::Ireland),
Self::Israel => Some(IsoCountry::Israel),
Self::Italy => Some(IsoCountry::Italy),
Self::IvoryCoast => Some(IsoCountry::CoteDIvoire),
Self::Jamaica => Some(IsoCountry::Jamaica),
Self::Japan => Some(IsoCountry::Japan),
Self::Jordan => Some(IsoCountry::Jordan),
Self::Kazakhstan => Some(IsoCountry::Kazakhstan),
Self::Kenya => Some(IsoCountry::Kenya),
Self::Kiribati => Some(IsoCountry::Kiribati),
Self::NorthKorea => Some(IsoCountry::NorthKorea),
Self::SouthKorea => Some(IsoCountry::SouthKorea),
Self::Kosovo => None,
Self::Kuwait => Some(IsoCountry::Kuwait),
Self::Kyrgyzstan => Some(IsoCountry::Kyrgyzstan),
Self::Laos => Some(IsoCountry::Laos),
Self::Latvia => Some(IsoCountry::Latvia),
Self::Lebanon => Some(IsoCountry::Lebanon),
Self::Lesotho => Some(IsoCountry::Lesotho),
Self::Liberia => Some(IsoCountry::Liberia),
Self::Libya => Some(IsoCountry::Libya),
Self::Liechtenstein => Some(IsoCountry::Liechtenstein),
Self::Lithuania => Some(IsoCountry::Lithuania),
Self::Luxembourg => Some(IsoCountry::Luxembourg),
Self::Macedonia => Some(IsoCountry::NorthMacedonia),
Self::Madagascar => Some(IsoCountry::Madagascar),
Self::Malawi => Some(IsoCountry::Malawi),
Self::Malaysia => Some(IsoCountry::Malaysia),
Self::Maldives => Some(IsoCountry::Maldives),
Self::Mali => Some(IsoCountry::Mali),
Self::Malta => Some(IsoCountry::Malta),
Self::MarshallIslands => Some(IsoCountry::MarshallIslands),
Self::Mauritania => Some(IsoCountry::Mauritania),
Self::Mauritius => Some(IsoCountry::Mauritius),
Self::Mexico => Some(IsoCountry::Mexico),
Self::Micronesia => Some(IsoCountry::Micronesia),
Self::Moldova => Some(IsoCountry::Moldova),
Self::Monaco => Some(IsoCountry::Monaco),
Self::Mongolia => Some(IsoCountry::Mongolia),
Self::Montenegro => Some(IsoCountry::Montenegro),
Self::Morocco => Some(IsoCountry::Morocco),
Self::Mozambique => Some(IsoCountry::Mozambique),
Self::Myanmar | Self::Burma => Some(IsoCountry::Myanmar),
Self::Namibia => Some(IsoCountry::Namibia),
Self::Nauru => Some(IsoCountry::Nauru),
Self::Nepal => Some(IsoCountry::Nepal),
Self::Netherlands => Some(IsoCountry::Netherlands),
Self::NewZealand => Some(IsoCountry::NewZealand),
Self::Nicaragua => Some(IsoCountry::Nicaragua),
Self::Niger => Some(IsoCountry::Niger),
Self::Nigeria => Some(IsoCountry::Nigeria),
Self::Norway => Some(IsoCountry::Norway),
Self::Oman => Some(IsoCountry::Oman),
Self::Pakistan => Some(IsoCountry::Pakistan),
Self::Palau => Some(IsoCountry::Palau),
Self::Panama => Some(IsoCountry::Panama),
Self::PapuaNewGuinea => Some(IsoCountry::PapuaNewGuinea),
Self::Paraguay => Some(IsoCountry::Paraguay),
Self::Peru => Some(IsoCountry::Peru),
Self::Philippines => Some(IsoCountry::Philippines),
Self::Poland => Some(IsoCountry::Poland),
Self::Portugal => Some(IsoCountry::Portugal),
Self::Qatar => Some(IsoCountry::Qatar),
Self::Romania => Some(IsoCountry::Romania),
Self::RussianFederation => Some(IsoCountry::RussianFederation),
Self::Rwanda => Some(IsoCountry::Rwanda),
Self::StKittsAndNevis => Some(IsoCountry::SaintKittsAndNevis),
Self::StLucia => Some(IsoCountry::SaintLucia),
Self::SaintVincentAndTheGrenadines => Some(IsoCountry::SaintVincentAndTheGrenadines),
Self::Samoa => Some(IsoCountry::Samoa),
Self::SanMarino => Some(IsoCountry::SanMarino),
Self::SaoTomeAndPrincipe => Some(IsoCountry::SaoTomeAndPrincipe),
Self::SaudiArabia => Some(IsoCountry::SaudiArabia),
Self::Senegal => Some(IsoCountry::Senegal),
Self::Serbia => Some(IsoCountry::Serbia),
Self::Seychelles => Some(IsoCountry::Seychelles),
Self::SierraLeone => Some(IsoCountry::SierraLeone),
Self::Singapore => Some(IsoCountry::Singapore),
Self::Slovakia => Some(IsoCountry::Slovakia),
Self::Slovenia => Some(IsoCountry::Slovenia),
Self::SolomonIslands => Some(IsoCountry::SolomonIslands),
Self::Somalia => Some(IsoCountry::Somalia),
Self::SouthAfrica => Some(IsoCountry::SouthAfrica),
Self::SouthSudan => Some(IsoCountry::SouthSudan),
Self::Spain => Some(IsoCountry::Spain),
Self::SriLanka => Some(IsoCountry::SriLanka),
Self::Sudan => Some(IsoCountry::Sudan),
Self::Suriname => Some(IsoCountry::Suriname),
Self::Swaziland => Some(IsoCountry::Eswatini),
Self::Sweden => Some(IsoCountry::Sweden),
Self::Switzerland => Some(IsoCountry::Switzerland),
Self::Syria => Some(IsoCountry::Syria),
Self::Taiwan => Some(IsoCountry::Taiwan),
Self::Tajikistan => Some(IsoCountry::Tajikistan),
Self::Tanzania => Some(IsoCountry::Tanzania),
Self::Thailand => Some(IsoCountry::Thailand),
Self::Togo => Some(IsoCountry::Togo),
Self::Tonga => Some(IsoCountry::Tonga),
Self::TrinidadAndTobago => Some(IsoCountry::TrinidadAndTobago),
Self::Tunisia => Some(IsoCountry::Tunisia),
Self::Turkey => Some(IsoCountry::Turkiye),
Self::Turkmenistan => Some(IsoCountry::Turkmenistan),
Self::Tuvalu => Some(IsoCountry::Tuvalu),
Self::Uganda => Some(IsoCountry::Uganda),
Self::Ukraine => Some(IsoCountry::Ukraine),
Self::UnitedArabEmirates => Some(IsoCountry::UnitedArabEmirates),
Self::UnitedKingdom => Some(IsoCountry::UnitedKingdom),
Self::UnitedStates => Some(IsoCountry::UnitedStates),
Self::Uruguay => Some(IsoCountry::Uruguay),
Self::Uzbekistan => Some(IsoCountry::Uzbekistan),
Self::Vanuatu => Some(IsoCountry::Vanuatu),
Self::VaticanCity => Some(IsoCountry::VaticanCity),
Self::Venezuela => Some(IsoCountry::Venezuela),
Self::Vietnam => Some(IsoCountry::Vietnam),
Self::Yemen => Some(IsoCountry::Yemen),
Self::Zambia => Some(IsoCountry::Zambia),
Self::Zimbabwe => Some(IsoCountry::Zimbabwe),
}
}
}
impl IsoCountry {
#[must_use]
pub fn legacy_countries(self) -> impl DoubleEndedIterator<Item = super::Country> {
super::Country::ALL
.iter()
.copied()
.filter(move |country| country.iso_country() == Some(self))
}
#[must_use]
pub fn eu_member(self) -> Option<super::EU> {
super::EU::ALL
.iter()
.copied()
.find(|member| member.iso_country() == self)
}
#[must_use]
pub fn states(self) -> impl DoubleEndedIterator<Item = super::States> {
super::States::ALL
.iter()
.copied()
.filter(move |state| state.iso_country() == self)
}
#[must_use]
pub fn canadian_provinces(self) -> impl DoubleEndedIterator<Item = super::CanadianProvince> {
super::CanadianProvince::ALL
.iter()
.copied()
.filter(move |province| province.iso_country() == self)
}
}