Numeric

Enum Numeric 

Source
#[non_exhaustive]
#[repr(u16)]
pub enum Numeric {
Show 348 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, Taiwan = 158, 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, FalklandIslandsMalvinas = 238, SouthGeorgiaAndTheSouthSandwichIslands = 239, Fiji = 242, Finland = 246, AlandIslands = 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, CoteDIvoire = 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, Curacao = 531, Aruba = 533, SintMaartenDutchPart = 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, Reunion = 638, Romania = 642, Russia = 643, Rwanda = 646, SaintBarthelemy = 652, SaintHelenaAscensionAndTristanDaCunha = 654, SaintKittsAndNevis = 659, Anguilla = 660, SaintLucia = 662, SaintMartinFrenchPart = 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, SvalbardAndJanMayen = 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, Turkey = 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, VirginIslandsUS = 850, BurkinaFaso = 854, Uruguay = 858, Uzbekistan = 860, Venezuela = 862, WallisAndFutuna = 876, Samoa = 882, Yemen = 887, Zambia = 894, User900 = 900, User901 = 901, User902 = 902, User903 = 903, User904 = 904, User905 = 905, User906 = 906, User907 = 907, User908 = 908, User909 = 909, User910 = 910, User911 = 911, User912 = 912, User913 = 913, User914 = 914, User915 = 915, User916 = 916, User917 = 917, User918 = 918, User919 = 919, User920 = 920, User921 = 921, User922 = 922, User923 = 923, User924 = 924, User925 = 925, User926 = 926, User927 = 927, User928 = 928, User929 = 929, User930 = 930, User931 = 931, User932 = 932, User933 = 933, User934 = 934, User935 = 935, User936 = 936, User937 = 937, User938 = 938, User939 = 939, User940 = 940, User941 = 941, User942 = 942, User943 = 943, User944 = 944, User945 = 945, User946 = 946, User947 = 947, User948 = 948, User949 = 949, User950 = 950, User951 = 951, User952 = 952, User953 = 953, User954 = 954, User955 = 955, User956 = 956, User957 = 957, User958 = 958, User959 = 959, User960 = 960, User961 = 961, User962 = 962, User963 = 963, User964 = 964, User965 = 965, User966 = 966, User967 = 967, User968 = 968, User969 = 969, User970 = 970, User971 = 971, User972 = 972, User973 = 973, User974 = 974, User975 = 975, User976 = 976, User977 = 977, User978 = 978, User979 = 979, User980 = 980, User981 = 981, User982 = 982, User983 = 983, User984 = 984, User985 = 985, User986 = 986, User987 = 987, User988 = 988, User989 = 989, User990 = 990, User991 = 991, User992 = 992, User993 = 993, User994 = 994, User995 = 995, User996 = 996, User997 = 997, User998 = 998,
}
Expand description

ISO 3166-1 Numeric Country Codes.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Afghanistan = 4

Afghanistan (AF, AFG)

§

Albania = 8

Albania (AL, ALB)

§

Antarctica = 10

Antarctica (AQ, ATA)

§

Algeria = 12

Algeria (DZ, DZA)

§

AmericanSamoa = 16

American Samoa (AS, ASM)

§

Andorra = 20

Andorra (AD, AND)

§

Angola = 24

Angola (AO, AGO)

§

AntiguaAndBarbuda = 28

Antigua and Barbuda (AG, ATG)

§

Azerbaijan = 31

Azerbaijan (AZ, AZE)

§

Argentina = 32

Argentina (AR, ARG)

§

Australia = 36

Australia (AU, AUS)

§

Austria = 40

Austria (AT, AUT)

§

Bahamas = 44

Bahamas (BS, BHS)

§

Bahrain = 48

Bahrain (BH, BHR)

§

Bangladesh = 50

Bangladesh (BD, BGD)

§

Armenia = 51

Armenia (AM, ARM)

§

Barbados = 52

Barbados (BB, BRB)

§

Belgium = 56

Belgium (BE, BEL)

§

Bermuda = 60

Bermuda (BM, BMU)

§

Bhutan = 64

Bhutan (BT, BTN)

§

Bolivia = 68

Bolivia, Plurinational State of (BO, BOL)

§

BosniaAndHerzegovina = 70

Bosnia and Herzegovina (BA, BIH)

§

Botswana = 72

Botswana (BW, BWA)

§

BouvetIsland = 74

Bouvet Island (BV, BVT)

§

Brazil = 76

Brazil (BR, BRA)

§

Belize = 84

Belize (BZ, BLZ)

§

BritishIndianOceanTerritory = 86

British Indian Ocean Territory (IO, IOT)

§

SolomonIslands = 90

Solomon Islands (SB, SLB)

§

BritishVirginIslands = 92

Virgin Islands (British) (VG, VGB)

§

BruneiDarussalam = 96

Brunei Darussalam (BN, BRN)

§

Bulgaria = 100

Bulgaria (BG, BGR)

§

Myanmar = 104

Myanmar (MM, MMR)

§

Burundi = 108

Burundi (BI, BDI)

§

Belarus = 112

Belarus (BY, BLR)

§

Cambodia = 116

Cambodia (KH, KHM)

§

Cameroon = 120

Cameroon (CM, CMR)

§

Canada = 124

Canada (CA, CAN)

§

CaboVerde = 132

Cabo Verde (CV, CPV)

§

CaymanIslands = 136

Cayman Islands (KY, CYM)

§

CentralAfricanRepublic = 140

Central African Republic (CF, CAF)

§

SriLanka = 144

Sri Lanka (LK, LKA)

§

Chad = 148

Chad (TD, TCD)

§

Chile = 152

Chile (CL, CHL)

§

China = 156

China (CN, CHN)

§

Taiwan = 158

Taiwan, Province of China (TW, TWN)

§

ChristmasIsland = 162

Christmas Island (CX, CXR)

§

CocosKeelingIslands = 166

Cocos (Keeling) Islands (CC, CCK)

§

Colombia = 170

Colombia (CO, COL)

§

Comoros = 174

Comoros (KM, COM)

§

Mayotte = 175

Mayotte (YT, MYT)

§

Congo = 178

Congo (CG, COG)

§

DemocraticRepublicOfTheCongo = 180

Congo, Democratic Republic of the (CD, COD)

§

CookIslands = 184

Cook Islands (CK, COK)

§

CostaRica = 188

Costa Rica (CR, CRI)

§

Croatia = 191

Croatia (HR, HRV)

§

Cuba = 192

Cuba (CU, CUB)

§

Cyprus = 196

Cyprus (CY, CYP)

§

Czechia = 203

Czechia (CZ, CZE)

§

Benin = 204

Benin (BJ, BEN)

§

Denmark = 208

Denmark (DK, DNK)

§

Dominica = 212

Dominica (DM, DMA)

§

DominicanRepublic = 214

Dominican Republic (DO, DOM)

§

Ecuador = 218

Ecuador (EC, ECU)

§

ElSalvador = 222

El Salvador (SV, SLV)

§

EquatorialGuinea = 226

Equatorial Guinea (GQ, GNQ)

§

Ethiopia = 231

Ethiopia (ET, ETH)

§

Eritrea = 232

Eritrea (ER, ERI)

§

Estonia = 233

Estonia (EE, EST)

§

FaroeIslands = 234

Faroe Islands (FO, FRO)

§

FalklandIslandsMalvinas = 238

Falkland Islands (Malvinas) (FK, FLK)

§

SouthGeorgiaAndTheSouthSandwichIslands = 239

South Georgia and the South Sandwich Islands (GS, SGS)

§

Fiji = 242

Fiji (FJ, FJI)

§

Finland = 246

Finland (FI, FIN)

§

AlandIslands = 248

Åland Islands (AX, ALA)

§

France = 250

France (FR, FRA)

§

FrenchGuiana = 254

French Guiana (GF, GUF)

§

FrenchPolynesia = 258

French Polynesia (PF, PYF)

§

FrenchSouthernTerritories = 260

French Southern Territories (TF, ATF)

§

Djibouti = 262

Djibouti (DJ, DJI)

§

Gabon = 266

Gabon (GA, GAB)

§

Georgia = 268

Georgia (GE, GEO)

§

Gambia = 270

Gambia (GM, GMB)

§

Palestine = 275

Palestine, State of (PS, PSE)

§

Germany = 276

Germany (DE, DEU)

§

Ghana = 288

Ghana (GH, GHA)

§

Gibraltar = 292

Gibraltar (GI, GIB)

§

Kiribati = 296

Kiribati (KI, KIR)

§

Greece = 300

Greece (GR, GRC)

§

Greenland = 304

Greenland (GL, GRL)

§

Grenada = 308

Grenada (GD, GRD)

§

Guadeloupe = 312

Guadeloupe (GP, GLP)

§

Guam = 316

Guam (GU, GUM)

§

Guatemala = 320

Guatemala (GT, GTM)

§

Guinea = 324

Guinea (GN, GIN)

§

Guyana = 328

Guyana (GY, GUY)

§

Haiti = 332

Haiti (HT, HTI)

§

HeardIslandAndMcDonaldIslands = 334

Heard Island and McDonald Islands (HM, HMD)

§

HolySee = 336

Holy See (VA, VAT)

§

Honduras = 340

Honduras (HN, HND)

§

HongKong = 344

Hong Kong (HK, HKG)

§

Hungary = 348

Hungary (HU, HUN)

§

Iceland = 352

Iceland (IS, ISL)

§

India = 356

India (IN, IND)

§

Indonesia = 360

Indonesia (ID, IDN)

§

Iran = 364

Iran, Islamic Republic of (IR, IRN)

§

Iraq = 368

Iraq (IQ, IRQ)

§

Ireland = 372

Ireland (IE, IRL)

§

Israel = 376

Israel (IL, ISR)

§

Italy = 380

Italy (IT, ITA)

§

CoteDIvoire = 384

Côte d’Ivoire (CI, CIV)

§

Jamaica = 388

Jamaica (JM, JAM)

§

Japan = 392

Japan (JP, JPN)

§

Kazakhstan = 398

Kazakhstan (KZ, KAZ)

§

Jordan = 400

Jordan (JO, JOR)

§

Kenya = 404

Kenya (KE, KEN)

§

NorthKorea = 408

Korea, Democratic People’s Republic of (KP, PRK)

§

SouthKorea = 410

Korea, Republic of (KR, KOR)

§

Kuwait = 414

Kuwait (KW, KWT)

§

Kyrgyzstan = 417

Kyrgyzstan (KG, KGZ)

§

Laos = 418

Lao People’s Democratic Republic (LA, LAO)

§

Lebanon = 422

Lebanon (LB, LBN)

§

Lesotho = 426

Lesotho (LS, LSO)

§

Latvia = 428

Latvia (LV, LVA)

§

Liberia = 430

Liberia (LR, LBR)

§

Libya = 434

Libya (LY, LBY)

§

Liechtenstein = 438

Liechtenstein (LI, LIE)

§

Lithuania = 440

Lithuania (LT, LTU)

§

Luxembourg = 442

Luxembourg (LU, LUX)

§

Macao = 446

Macao (MO, MAC)

§

Madagascar = 450

Madagascar (MG, MDG)

§

Malawi = 454

Malawi (MW, MWI)

§

Malaysia = 458

Malaysia (MY, MYS)

§

Maldives = 462

Maldives (MV, MDV)

§

Mali = 466

Mali (ML, MLI)

§

Malta = 470

Malta (MT, MLT)

§

Martinique = 474

Martinique (MQ, MTQ)

§

Mauritania = 478

Mauritania (MR, MRT)

§

Mauritius = 480

Mauritius (MU, MUS)

§

Mexico = 484

Mexico (MX, MEX)

§

Monaco = 492

Monaco (MC, MCO)

§

Mongolia = 496

Mongolia (MN, MNG)

§

Moldova = 498

Moldova, Republic of (MD, MDA)

§

Montenegro = 499

Montenegro (ME, MNE)

§

Montserrat = 500

Montserrat (MS, MSR)

§

Morocco = 504

Morocco (MA, MAR)

§

Mozambique = 508

Mozambique (MZ, MOZ)

§

Oman = 512

Oman (OM, OMN)

§

Namibia = 516

Namibia (NA, NAM)

§

Nauru = 520

Nauru (NR, NRU)

§

Nepal = 524

Nepal (NP, NPL)

§

Netherlands = 528

Netherlands, Kingdom of the (NL, NLD)

§

Curacao = 531

Curaçao (CW, CUW)

§

Aruba = 533

Aruba (AW, ABW)

§

SintMaartenDutchPart = 534

Sint Maarten (Dutch part) (SX, SXM)

§

BonaireSintEustatiusAndSaba = 535

Bonaire, Sint Eustatius and Saba (BQ, BES)

§

NewCaledonia = 540

New Caledonia (NC, NCL)

§

Vanuatu = 548

Vanuatu (VU, VUT)

§

NewZealand = 554

New Zealand (NZ, NZL)

§

Nicaragua = 558

Nicaragua (NI, NIC)

§

Niger = 562

Niger (NE, NER)

§

Nigeria = 566

Nigeria (NG, NGA)

§

Niue = 570

Niue (NU, NIU)

§

NorfolkIsland = 574

Norfolk Island (NF, NFK)

§

Norway = 578

Norway (NO, NOR)

§

NorthernMarianaIslands = 580

Northern Mariana Islands (MP, MNP)

§

UnitedStatesMinorOutlyingIslands = 581

United States Minor Outlying Islands (UM, UMI)

§

Micronesia = 583

Micronesia, Federated States of (FM, FSM)

§

MarshallIslands = 584

Marshall Islands (MH, MHL)

§

Palau = 585

Palau (PW, PLW)

§

Pakistan = 586

Pakistan (PK, PAK)

§

Panama = 591

Panama (PA, PAN)

§

PapuaNewGuinea = 598

Papua New Guinea (PG, PNG)

§

Paraguay = 600

Paraguay (PY, PRY)

§

Peru = 604

Peru (PE, PER)

§

Philippines = 608

Philippines (PH, PHL)

§

Pitcairn = 612

Pitcairn (PN, PCN)

§

Poland = 616

Poland (PL, POL)

§

Portugal = 620

Portugal (PT, PRT)

§

GuineaBissau = 624

Guinea-Bissau (GW, GNB)

§

TimorLeste = 626

Timor-Leste (TL, TLS)

§

PuertoRico = 630

Puerto Rico (PR, PRI)

§

Qatar = 634

Qatar (QA, QAT)

§

Reunion = 638

Réunion (RE, REU)

§

Romania = 642

Romania (RO, ROU)

§

Russia = 643

Russian Federation (RU, RUS)

§

Rwanda = 646

Rwanda (RW, RWA)

§

SaintBarthelemy = 652

Saint Barthélemy (BL, BLM)

§

SaintHelenaAscensionAndTristanDaCunha = 654

Saint Helena, Ascension and Tristan da Cunha (SH, SHN)

§

SaintKittsAndNevis = 659

Saint Kitts and Nevis (KN, KNA)

§

Anguilla = 660

Anguilla (AI, AIA)

§

SaintLucia = 662

Saint Lucia (LC, LCA)

§

SaintMartinFrenchPart = 663

Saint Martin (French part) (MF, MAF)

§

SaintPierreAndMiquelon = 666

Saint Pierre and Miquelon (PM, SPM)

§

SaintVincentAndTheGrenadines = 670

Saint Vincent and the Grenadines (VC, VCT)

§

SanMarino = 674

San Marino (SM, SMR)

§

SaoTomeAndPrincipe = 678

Sao Tome and Principe (ST, STP)

§

SaudiArabia = 682

Saudi Arabia (SA, SAU)

§

Senegal = 686

Senegal (SN, SEN)

§

Serbia = 688

Serbia (RS, SRB)

§

Seychelles = 690

Seychelles (SC, SYC)

§

SierraLeone = 694

Sierra Leone (SL, SLE)

§

Singapore = 702

Singapore (SG, SGP)

§

Slovakia = 703

Slovakia (SK, SVK)

§

VietNam = 704

Viet Nam (VN, VNM)

§

Slovenia = 705

Slovenia (SI, SVN)

§

Somalia = 706

Somalia (SO, SOM)

§

SouthAfrica = 710

South Africa (ZA, ZAF)

§

Zimbabwe = 716

Zimbabwe (ZW, ZWE)

§

Spain = 724

Spain (ES, ESP)

§

SouthSudan = 728

South Sudan (SS, SSD)

§

Sudan = 729

Sudan (SD, SDN)

§

WesternSahara = 732

Western Sahara (EH, ESH)

§

Suriname = 740

Suriname (SR, SUR)

§

SvalbardAndJanMayen = 744

Svalbard and Jan Mayen (SJ, SJM)

§

Eswatini = 748

Eswatini (SZ, SWZ)

§

Sweden = 752

Sweden (SE, SWE)

§

Switzerland = 756

Switzerland (CH, CHE)

§

Syria = 760

Syrian Arab Republic (SY, SYR)

§

Tajikistan = 762

Tajikistan (TJ, TJK)

§

Thailand = 764

Thailand (TH, THA)

§

Togo = 768

Togo (TG, TGO)

§

Tokelau = 772

Tokelau (TK, TKL)

§

Tonga = 776

Tonga (TO, TON)

§

TrinidadAndTobago = 780

Trinidad and Tobago (TT, TTO)

§

UnitedArabEmirates = 784

United Arab Emirates (AE, ARE)

§

Tunisia = 788

Tunisia (TN, TUN)

§

Turkey = 792

Türkiye (TR, TUR)

§

Turkmenistan = 795

Turkmenistan (TM, TKM)

§

TurksAndCaicosIslands = 796

Turks and Caicos Islands (TC, TCA)

§

Tuvalu = 798

Tuvalu (TV, TUV)

§

Uganda = 800

Uganda (UG, UGA)

§

Ukraine = 804

Ukraine (UA, UKR)

§

NorthMacedonia = 807

North Macedonia (MK, MKD)

§

Egypt = 818

Egypt (EG, EGY)

§

UnitedKingdom = 826

United Kingdom of Great Britain and Northern Ireland (GB, GBR)

§

Guernsey = 831

Guernsey (GG, GGY)

§

Jersey = 832

Jersey (JE, JEY)

§

IsleOfMan = 833

Isle of Man (IM, IMN)

§

Tanzania = 834

Tanzania, United Republic of (TZ, TZA)

§

UnitedStatesOfAmerica = 840

United States of America (US, USA)

§

VirginIslandsUS = 850

Virgin Islands (U.S.) (VI, VIR)

§

BurkinaFaso = 854

Burkina Faso (BF, BFA)

§

Uruguay = 858

Uruguay (UY, URY)

§

Uzbekistan = 860

Uzbekistan (UZ, UZB)

§

Venezuela = 862

Venezuela, Bolivarian Republic of (VE, VEN)

§

WallisAndFutuna = 876

Wallis and Futuna (WF, WLF)

§

Samoa = 882

Samoa (WS, WSM)

§

Yemen = 887

Yemen (YE, YEM)

§

Zambia = 894

Zambia (ZM, ZMB)

§

User900 = 900

User-assigned 900

§

User901 = 901

User-assigned 901

§

User902 = 902

User-assigned 902

§

User903 = 903

User-assigned 903

§

User904 = 904

User-assigned 904

§

User905 = 905

User-assigned 905

§

User906 = 906

User-assigned 906

§

User907 = 907

User-assigned 907

§

User908 = 908

User-assigned 908

§

User909 = 909

User-assigned 909

§

User910 = 910

User-assigned 910

§

User911 = 911

User-assigned 911

§

User912 = 912

User-assigned 912

§

User913 = 913

User-assigned 913

§

User914 = 914

User-assigned 914

§

User915 = 915

User-assigned 915

§

User916 = 916

User-assigned 916

§

User917 = 917

User-assigned 917

§

User918 = 918

User-assigned 918

§

User919 = 919

User-assigned 919

§

User920 = 920

User-assigned 920

§

User921 = 921

User-assigned 921

§

User922 = 922

User-assigned 922

§

User923 = 923

User-assigned 923

§

User924 = 924

User-assigned 924

§

User925 = 925

User-assigned 925

§

User926 = 926

User-assigned 926

§

User927 = 927

User-assigned 927

§

User928 = 928

User-assigned 928

§

User929 = 929

User-assigned 929

§

User930 = 930

User-assigned 930

§

User931 = 931

User-assigned 931

§

User932 = 932

User-assigned 932

§

User933 = 933

User-assigned 933

§

User934 = 934

User-assigned 934

§

User935 = 935

User-assigned 935

§

User936 = 936

User-assigned 936

§

User937 = 937

User-assigned 937

§

User938 = 938

User-assigned 938

§

User939 = 939

User-assigned 939

§

User940 = 940

User-assigned 940

§

User941 = 941

User-assigned 941

§

User942 = 942

User-assigned 942

§

User943 = 943

User-assigned 943

§

User944 = 944

User-assigned 944

§

User945 = 945

User-assigned 945

§

User946 = 946

User-assigned 946

§

User947 = 947

User-assigned 947

§

User948 = 948

User-assigned 948

§

User949 = 949

User-assigned 949

§

User950 = 950

User-assigned 950

§

User951 = 951

User-assigned 951

§

User952 = 952

User-assigned 952

§

User953 = 953

User-assigned 953

§

User954 = 954

User-assigned 954

§

User955 = 955

User-assigned 955

§

User956 = 956

User-assigned 956

§

User957 = 957

User-assigned 957

§

User958 = 958

User-assigned 958

§

User959 = 959

User-assigned 959

§

User960 = 960

User-assigned 960

§

User961 = 961

User-assigned 961

§

User962 = 962

User-assigned 962

§

User963 = 963

User-assigned 963

§

User964 = 964

User-assigned 964

§

User965 = 965

User-assigned 965

§

User966 = 966

User-assigned 966

§

User967 = 967

User-assigned 967

§

User968 = 968

User-assigned 968

§

User969 = 969

User-assigned 969

§

User970 = 970

User-assigned 970

§

User971 = 971

User-assigned 971

§

User972 = 972

User-assigned 972

§

User973 = 973

User-assigned 973

§

User974 = 974

User-assigned 974

§

User975 = 975

User-assigned 975

§

User976 = 976

User-assigned 976

§

User977 = 977

User-assigned 977

§

User978 = 978

User-assigned 978

§

User979 = 979

User-assigned 979

§

User980 = 980

User-assigned 980

§

User981 = 981

User-assigned 981

§

User982 = 982

User-assigned 982

§

User983 = 983

User-assigned 983

§

User984 = 984

User-assigned 984

§

User985 = 985

User-assigned 985

§

User986 = 986

User-assigned 986

§

User987 = 987

User-assigned 987

§

User988 = 988

User-assigned 988

§

User989 = 989

User-assigned 989

§

User990 = 990

User-assigned 990

§

User991 = 991

User-assigned 991

§

User992 = 992

User-assigned 992

§

User993 = 993

User-assigned 993

§

User994 = 994

User-assigned 994

§

User995 = 995

User-assigned 995

§

User996 = 996

User-assigned 996

§

User997 = 997

User-assigned 997

§

User998 = 998

User-assigned 998

Implementations§

Source§

impl Numeric

Source

pub const fn from_u16(value: u16) -> Result<Self, Error>

Try to create a new numeric value from the given 16-bit integer.

§Errors
Source

pub const fn from_alpha2(value: Alpha2) -> Result<Self, Error>

Try to create a new numeric code from the given alpha-2 code.

Note that user-assigned alpha-2 codes do not have a direct numeric representation.

§Errors
  • Error::UserAssigned when attempting to translate to a User-assigned Alpha-2 code to a numeric code.
Source

pub const fn from_alpha3(value: Alpha3) -> Result<Self, Error>

Try to create a new numeric code from the given alpha-2 code.

Note that user-assigned alpha-2 codes do not have a direct numeric representation.

§Errors
  • Error::UserAssigned when attempting to translate to a User-assigned Alpha-3 code to a numeric code.
Source

pub const fn is_user_assigned(&self) -> bool

Determine whether a given enum value represents a user-assigned value.

§Examples
use iso3166_static::Numeric;

assert!(!Numeric::UnitedStatesOfAmerica.is_user_assigned());
assert!(Numeric::User900.is_user_assigned());

Trait Implementations§

Source§

impl Clone for Numeric

Source§

fn clone(&self) -> Numeric

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Numeric

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Numeric

Available on crate feature serde only.
Source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for Numeric

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult

Formats the value using the given formatter. Read more
Source§

impl From<Numeric> for u16

Source§

fn from(value: Numeric) -> Self

Converts to this type from the input type.
Source§

impl Hash for Numeric

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for Numeric

Source§

fn cmp(&self, other: &Numeric) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq<Alpha2> for Numeric

Source§

fn eq(&self, other: &Alpha2) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<Alpha3> for Numeric

Source§

fn eq(&self, other: &Alpha3) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<Numeric> for Alpha2

Source§

fn eq(&self, other: &Numeric) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<Numeric> for Alpha3

Source§

fn eq(&self, other: &Numeric) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq for Numeric

Source§

fn eq(&self, other: &Numeric) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Numeric

Source§

fn partial_cmp(&self, other: &Numeric) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Serialize for Numeric

Available on crate feature serde only.
Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TryFrom<Alpha2> for Numeric

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Alpha2) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Alpha3> for Numeric

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Alpha3) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Numeric> for Alpha2

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Numeric) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Numeric> for Alpha3

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Numeric) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u16> for Numeric

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: u16) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl Copy for Numeric

Source§

impl Eq for Numeric

Source§

impl StructuralPartialEq for Numeric

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,