#[repr(u16)]pub enum Country {
Show 248 variants
Afghanistan = 4,
Albania = 8,
Antarctica = 10,
Algeria = 12,
AmericanSamoa = 16,
Andorra = 20,
Angola = 24,
AntiguaAndBarbuda = 28,
Azerbaijan = 31,
Argentina = 32,
Australia = 36,
Austria = 40,
Bahamas = 44,
Bahrain = 48,
Bangladesh = 50,
Armenia = 51,
Barbados = 52,
Belgium = 56,
Bermuda = 60,
Bhutan = 64,
Bolivia = 68,
BosniaAndHerzegovina = 70,
Botswana = 72,
BouvetIsland = 74,
Brazil = 76,
Belize = 84,
BritishIndianOceanTerritory = 86,
SolomonIslands = 90,
BritishVirginIslands = 92,
BruneiDarussalam = 96,
Bulgaria = 100,
Myanmar = 104,
Burundi = 108,
Belarus = 112,
Cambodia = 116,
Cameroon = 120,
Canada = 124,
CaboVerde = 132,
CaymanIslands = 136,
CentralAfricanRepublic = 140,
SriLanka = 144,
Chad = 148,
Chile = 152,
China = 156,
ChristmasIsland = 162,
CocosKeelingIslands = 166,
Colombia = 170,
Comoros = 174,
Mayotte = 175,
Congo = 178,
DemocraticRepublicOfTheCongo = 180,
CookIslands = 184,
CostaRica = 188,
Croatia = 191,
Cuba = 192,
Cyprus = 196,
Czechia = 203,
Benin = 204,
Denmark = 208,
Dominica = 212,
DominicanRepublic = 214,
Ecuador = 218,
ElSalvador = 222,
EquatorialGuinea = 226,
Ethiopia = 231,
Eritrea = 232,
Estonia = 233,
FaroeIslands = 234,
FalklandIslands = 238,
SouthGeorgiaAndTheSouthSandwichIslands = 239,
Fiji = 242,
Finland = 246,
ÅlandIslands = 248,
France = 250,
FrenchGuiana = 254,
FrenchPolynesia = 258,
FrenchSouthernTerritories = 260,
Djibouti = 262,
Gabon = 266,
Georgia = 268,
Gambia = 270,
Palestine = 275,
Germany = 276,
Ghana = 288,
Gibraltar = 292,
Kiribati = 296,
Greece = 300,
Greenland = 304,
Grenada = 308,
Guadeloupe = 312,
Guam = 316,
Guatemala = 320,
Guinea = 324,
Guyana = 328,
Haiti = 332,
HeardIslandAndMcDonaldIslands = 334,
HolySee = 336,
Honduras = 340,
HongKong = 344,
Hungary = 348,
Iceland = 352,
India = 356,
Indonesia = 360,
Iran = 364,
Iraq = 368,
Ireland = 372,
Israel = 376,
Italy = 380,
CôteDIvoire = 384,
Jamaica = 388,
Japan = 392,
Kazakhstan = 398,
Jordan = 400,
Kenya = 404,
NorthKorea = 408,
SouthKorea = 410,
Kuwait = 414,
Kyrgyzstan = 417,
Laos = 418,
Lebanon = 422,
Lesotho = 426,
Latvia = 428,
Liberia = 430,
Libya = 434,
Liechtenstein = 438,
Lithuania = 440,
Luxembourg = 442,
Macao = 446,
Madagascar = 450,
Malawi = 454,
Malaysia = 458,
Maldives = 462,
Mali = 466,
Malta = 470,
Martinique = 474,
Mauritania = 478,
Mauritius = 480,
Mexico = 484,
Monaco = 492,
Mongolia = 496,
Moldova = 498,
Montenegro = 499,
Montserrat = 500,
Morocco = 504,
Mozambique = 508,
Oman = 512,
Namibia = 516,
Nauru = 520,
Nepal = 524,
Netherlands = 528,
Curaçao = 531,
Aruba = 533,
DutchSaintMartin = 534,
BonaireSintEustatiusAndSaba = 535,
NewCaledonia = 540,
Vanuatu = 548,
NewZealand = 554,
Nicaragua = 558,
Niger = 562,
Nigeria = 566,
Niue = 570,
NorfolkIsland = 574,
Norway = 578,
NorthernMarianaIslands = 580,
UnitedStatesMinorOutlyingIslands = 581,
Micronesia = 583,
MarshallIslands = 584,
Palau = 585,
Pakistan = 586,
Panama = 591,
PapuaNewGuinea = 598,
Paraguay = 600,
Peru = 604,
Philippines = 608,
Pitcairn = 612,
Poland = 616,
Portugal = 620,
GuineaBissau = 624,
TimorLeste = 626,
PuertoRico = 630,
Qatar = 634,
Réunion = 638,
Romania = 642,
Russia = 643,
Rwanda = 646,
SaintBarthélemy = 652,
SaintHelena = 654,
SaintKittsAndNevis = 659,
Anguilla = 660,
SaintLucia = 662,
FrenchSaintMartin = 663,
SaintPierreAndMiquelon = 666,
SaintVincentAndTheGrenadines = 670,
SanMarino = 674,
SaoTomeAndPrincipe = 678,
SaudiArabia = 682,
Senegal = 686,
Serbia = 688,
Seychelles = 690,
SierraLeone = 694,
Singapore = 702,
Slovakia = 703,
VietNam = 704,
Slovenia = 705,
Somalia = 706,
SouthAfrica = 710,
Zimbabwe = 716,
Spain = 724,
SouthSudan = 728,
Sudan = 729,
WesternSahara = 732,
Suriname = 740,
SvalbardAndJanMayenIslands = 744,
Eswatini = 748,
Sweden = 752,
Switzerland = 756,
Syria = 760,
Tajikistan = 762,
Thailand = 764,
Togo = 768,
Tokelau = 772,
Tonga = 776,
TrinidadAndTobago = 780,
UnitedArabEmirates = 784,
Tunisia = 788,
Türkiye = 792,
Turkmenistan = 795,
TurksAndCaicosIslands = 796,
Tuvalu = 798,
Uganda = 800,
Ukraine = 804,
NorthMacedonia = 807,
Egypt = 818,
UnitedKingdom = 826,
Guernsey = 831,
Jersey = 832,
IsleOfMan = 833,
Tanzania = 834,
UnitedStatesOfAmerica = 840,
UnitedStatesVirginIslands = 850,
BurkinaFaso = 854,
Uruguay = 858,
Uzbekistan = 860,
Venezuela = 862,
WallisAndFutunaIslands = 876,
Samoa = 882,
Yemen = 887,
Zambia = 894,
}Expand description
ISO 3166 Countries.
Variants§
Afghanistan = 4
Afghanistan
Albania = 8
Albania
Antarctica = 10
Antarctica
Algeria = 12
Algeria
AmericanSamoa = 16
American Samoa
Andorra = 20
Andorra
Angola = 24
Angola
AntiguaAndBarbuda = 28
Antigua and Barbuda
Azerbaijan = 31
Azerbaijan
Argentina = 32
Argentina
Australia = 36
Australia
Austria = 40
Austria
Bahamas = 44
Bahamas
Bahrain = 48
Bahrain
Bangladesh = 50
Bangladesh
Armenia = 51
Armenia
Barbados = 52
Barbados
Belgium = 56
Belgium
Bermuda = 60
Bermuda
Bhutan = 64
Bhutan
Bolivia = 68
Bolivia (Plurinational State of)
BosniaAndHerzegovina = 70
Bosnia and Herzegovina
Botswana = 72
Botswana
BouvetIsland = 74
Bouvet Island
Brazil = 76
Brazil
Belize = 84
Belize
BritishIndianOceanTerritory = 86
British Indian Ocean Territory
SolomonIslands = 90
Solomon Islands
BritishVirginIslands = 92
British Virgin Islands
BruneiDarussalam = 96
Brunei Darussalam
Bulgaria = 100
Bulgaria
Myanmar = 104
Myanmar
Burundi = 108
Burundi
Belarus = 112
Belarus
Cambodia = 116
Cambodia
Cameroon = 120
Cameroon
Canada = 124
Canada
CaboVerde = 132
Cabo Verde
CaymanIslands = 136
Cayman Islands
CentralAfricanRepublic = 140
Central African Republic
SriLanka = 144
Sri Lanka
Chad = 148
Chad
Chile = 152
Chile
China = 156
China
ChristmasIsland = 162
Christmas Island
CocosKeelingIslands = 166
Cocos (Keeling) Islands
Colombia = 170
Colombia
Comoros = 174
Comoros
Mayotte = 175
Mayotte
Congo = 178
Congo
DemocraticRepublicOfTheCongo = 180
Democratic Republic of the Congo
CookIslands = 184
Cook Islands
CostaRica = 188
Costa Rica
Croatia = 191
Croatia
Cuba = 192
Cuba
Cyprus = 196
Cyprus
Czechia = 203
Czechia
Benin = 204
Benin
Denmark = 208
Denmark
Dominica = 212
Dominica
DominicanRepublic = 214
Dominican Republic
Ecuador = 218
Ecuador
ElSalvador = 222
El Salvador
EquatorialGuinea = 226
Equatorial Guinea
Ethiopia = 231
Ethiopia
Eritrea = 232
Eritrea
Estonia = 233
Estonia
FaroeIslands = 234
Faroe Islands
FalklandIslands = 238
Falkland Islands (Malvinas)
SouthGeorgiaAndTheSouthSandwichIslands = 239
South Georgia and the South Sandwich Islands
Fiji = 242
Fiji
Finland = 246
Finland
ÅlandIslands = 248
Åland Islands
France = 250
France
FrenchGuiana = 254
French Guiana
FrenchPolynesia = 258
French Polynesia
FrenchSouthernTerritories = 260
French Southern Territories
Djibouti = 262
Djibouti
Gabon = 266
Gabon
Georgia = 268
Georgia
Gambia = 270
Gambia
Palestine = 275
State of Palestine
Germany = 276
Germany
Ghana = 288
Ghana
Gibraltar = 292
Gibraltar
Kiribati = 296
Kiribati
Greece = 300
Greece
Greenland = 304
Greenland
Grenada = 308
Grenada
Guadeloupe = 312
Guadeloupe
Guam = 316
Guam
Guatemala = 320
Guatemala
Guinea = 324
Guinea
Guyana = 328
Guyana
Haiti = 332
Haiti
HeardIslandAndMcDonaldIslands = 334
Heard Island and McDonald Islands
HolySee = 336
Holy See
Honduras = 340
Honduras
HongKong = 344
China, Hong Kong Special Administrative Region
Hungary = 348
Hungary
Iceland = 352
Iceland
India = 356
India
Indonesia = 360
Indonesia
Iran = 364
Iran (Islamic Republic of)
Iraq = 368
Iraq
Ireland = 372
Ireland
Israel = 376
Israel
Italy = 380
Italy
CôteDIvoire = 384
Côte d’Ivoire
Jamaica = 388
Jamaica
Japan = 392
Japan
Kazakhstan = 398
Kazakhstan
Jordan = 400
Jordan
Kenya = 404
Kenya
NorthKorea = 408
Democratic People’s Republic of Korea
SouthKorea = 410
Republic of Korea
Kuwait = 414
Kuwait
Kyrgyzstan = 417
Kyrgyzstan
Laos = 418
Lao People’s Democratic Republic
Lebanon = 422
Lebanon
Lesotho = 426
Lesotho
Latvia = 428
Latvia
Liberia = 430
Liberia
Libya = 434
Libya
Liechtenstein = 438
Liechtenstein
Lithuania = 440
Lithuania
Luxembourg = 442
Luxembourg
Macao = 446
China, Macao Special Administrative Region
Madagascar = 450
Madagascar
Malawi = 454
Malawi
Malaysia = 458
Malaysia
Maldives = 462
Maldives
Mali = 466
Mali
Malta = 470
Malta
Martinique = 474
Martinique
Mauritania = 478
Mauritania
Mauritius = 480
Mauritius
Mexico = 484
Mexico
Monaco = 492
Monaco
Mongolia = 496
Mongolia
Moldova = 498
Republic of Moldova
Montenegro = 499
Montenegro
Montserrat = 500
Montserrat
Morocco = 504
Morocco
Mozambique = 508
Mozambique
Oman = 512
Oman
Namibia = 516
Namibia
Nauru = 520
Nauru
Nepal = 524
Nepal
Netherlands = 528
Netherlands (Kingdom of the)
Curaçao = 531
Curaçao
Aruba = 533
Aruba
DutchSaintMartin = 534
Sint Maarten (Dutch part)
BonaireSintEustatiusAndSaba = 535
Bonaire, Sint Eustatius and Saba
NewCaledonia = 540
New Caledonia
Vanuatu = 548
Vanuatu
NewZealand = 554
New Zealand
Nicaragua = 558
Nicaragua
Niger = 562
Niger
Nigeria = 566
Nigeria
Niue = 570
Niue
NorfolkIsland = 574
Norfolk Island
Norway = 578
Norway
NorthernMarianaIslands = 580
Northern Mariana Islands
UnitedStatesMinorOutlyingIslands = 581
United States Minor Outlying Islands
Micronesia = 583
Micronesia (Federated States of)
MarshallIslands = 584
Marshall Islands
Palau = 585
Palau
Pakistan = 586
Pakistan
Panama = 591
Panama
PapuaNewGuinea = 598
Papua New Guinea
Paraguay = 600
Paraguay
Peru = 604
Peru
Philippines = 608
Philippines
Pitcairn = 612
Pitcairn
Poland = 616
Poland
Portugal = 620
Portugal
GuineaBissau = 624
Guinea-Bissau
TimorLeste = 626
Timor-Leste
PuertoRico = 630
Puerto Rico
Qatar = 634
Qatar
Réunion = 638
Réunion
Romania = 642
Romania
Russia = 643
Russian Federation
Rwanda = 646
Rwanda
SaintBarthélemy = 652
Saint Barthélemy
SaintHelena = 654
Saint Helena
SaintKittsAndNevis = 659
Saint Kitts and Nevis
Anguilla = 660
Anguilla
SaintLucia = 662
Saint Lucia
FrenchSaintMartin = 663
Saint Martin (French Part)
SaintPierreAndMiquelon = 666
Saint Pierre and Miquelon
SaintVincentAndTheGrenadines = 670
Saint Vincent and the Grenadines
SanMarino = 674
San Marino
SaoTomeAndPrincipe = 678
Sao Tome and Principe
SaudiArabia = 682
Saudi Arabia
Senegal = 686
Senegal
Serbia = 688
Serbia
Seychelles = 690
Seychelles
SierraLeone = 694
Sierra Leone
Singapore = 702
Singapore
Slovakia = 703
Slovakia
VietNam = 704
Viet Nam
Slovenia = 705
Slovenia
Somalia = 706
Somalia
SouthAfrica = 710
South Africa
Zimbabwe = 716
Zimbabwe
Spain = 724
Spain
SouthSudan = 728
South Sudan
Sudan = 729
Sudan
WesternSahara = 732
Western Sahara
Suriname = 740
Suriname
SvalbardAndJanMayenIslands = 744
Svalbard and Jan Mayen Islands
Eswatini = 748
Eswatini
Sweden = 752
Sweden
Switzerland = 756
Switzerland
Syria = 760
Syrian Arab Republic
Tajikistan = 762
Tajikistan
Thailand = 764
Thailand
Togo = 768
Togo
Tokelau = 772
Tokelau
Tonga = 776
Tonga
TrinidadAndTobago = 780
Trinidad and Tobago
UnitedArabEmirates = 784
United Arab Emirates
Tunisia = 788
Tunisia
Türkiye = 792
Türkiye
Turkmenistan = 795
Turkmenistan
TurksAndCaicosIslands = 796
Turks and Caicos Islands
Tuvalu = 798
Tuvalu
Uganda = 800
Uganda
Ukraine = 804
Ukraine
NorthMacedonia = 807
North Macedonia
Egypt = 818
Egypt
UnitedKingdom = 826
United Kingdom of Great Britain and Northern Ireland
Guernsey = 831
Guernsey
Jersey = 832
Jersey
IsleOfMan = 833
Isle of Man
Tanzania = 834
United Republic of Tanzania
UnitedStatesOfAmerica = 840
United States of America
UnitedStatesVirginIslands = 850
United States Virgin Islands
BurkinaFaso = 854
Burkina Faso
Uruguay = 858
Uruguay
Uzbekistan = 860
Uzbekistan
Venezuela = 862
Venezuela (Bolivarian Republic of)
WallisAndFutunaIslands = 876
Wallis and Futuna Islands
Samoa = 882
Samoa
Yemen = 887
Yemen
Zambia = 894
Zambia
Implementations§
Source§impl Country
impl Country
Sourcepub const fn try_from_alpha2(s: &str) -> Result<Self, Error>
pub const fn try_from_alpha2(s: &str) -> Result<Self, Error>
Create a new country code enum value from the given Alpah2 code string.
Sourcepub const fn try_from_alpha3(s: &str) -> Result<Self, Error>
pub const fn try_from_alpha3(s: &str) -> Result<Self, Error>
Create a new country code enum value from the given Alpah3 code string.
Sourcepub const fn try_from_u16(value: u16) -> Result<Self, Error>
pub const fn try_from_u16(value: u16) -> Result<Self, Error>
Create a new country enum from the given u16 value.
Sourcepub const fn as_alpha2_str(&self) -> &'static str
pub const fn as_alpha2_str(&self) -> &'static str
Get the Alpha2 code as an uppercase 2-character static string
Sourcepub const fn as_alpha3_str(&self) -> &'static str
pub const fn as_alpha3_str(&self) -> &'static str
Get the Alpha3 country code as an uppercase static 3-character string