1#![allow(non_camel_case_types)]
2
3#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Hash)]
5pub enum Country {
6 Andorra,
8 UnitedArabEmirates,
10 Afghanistan,
12 AntiguaAndBarbuda,
14 Anguilla,
16 Albania,
18 Armenia,
20 Angola,
22 Antarctica,
24 Argentina,
26 AmericanSamoa,
28 Austria,
30 Australia,
32 Aruba,
34 ÅlandIslands,
36 Azerbaijan,
38 BosniaAndHerzegovina,
40 Barbados,
42 Bangladesh,
44 Belgium,
46 BurkinaFaso,
48 Bulgaria,
50 Bahrain,
52 Burundi,
54 Benin,
56 SaintBarthélemy,
58 Bermuda,
60 BruneiDarussalam,
62 BoliviaPlurinationalState,
64 BonaireSintEustatiusAndSaba,
66 Brazil,
68 Bahamas,
70 Bhutan,
72 BouvetIsland,
74 Botswana,
76 Belarus,
78 Belize,
80 Canada,
82 CocosKeelingIslands,
84 CongoDemocraticRepublic,
86 CentralAfricanRepublic,
88 Congo,
90 Switzerland,
92 CôteDivoire,
94 CookIslands,
96 Chile,
98 Cameroon,
100 China,
102 Colombia,
104 CostaRica,
106 Cuba,
108 CaboVerde,
110 Curaçao,
112 ChristmasIsland,
114 Cyprus,
116 Czechia,
118 Germany,
120 Djibouti,
122 Denmark,
124 Dominica,
126 DominicanRepublic,
128 Algeria,
130 Ecuador,
132 Estonia,
134 Egypt,
136 WesternSahara,
138 Eritrea,
140 Spain,
142 Ethiopia,
144 Finland,
146 Fiji,
148 FalklandIslandsMalvinas,
150 MicronesiaFederatedStates,
152 FaroeIslands,
154 France,
156 Gabon,
158 UnitedKingdomGreatBritainAndNorthernIreland,
160 Grenada,
162 Georgia,
164 FrenchGuiana,
166 Guernsey,
168 Ghana,
170 Gibraltar,
172 Greenland,
174 Gambia,
176 Guinea,
178 Guadeloupe,
180 EquatorialGuinea,
182 Greece,
184 SouthGeorgiaAndSouthSandwichIslands,
186 Guatemala,
188 Guam,
190 GuineaBissau,
192 Guyana,
194 HongKong,
196 HeardIslandAndMcdonaldIslands,
198 Honduras,
200 Croatia,
202 Haiti,
204 Hungary,
206 Indonesia,
208 Ireland,
210 Israel,
212 IsleMan,
214 India,
216 BritishIndianOceanTerritory,
218 Iraq,
220 IranIslamicRepublic,
222 Iceland,
224 Italy,
226 Jersey,
228 Jamaica,
230 Jordan,
232 Japan,
234 Kenya,
236 Kyrgyzstan,
238 Cambodia,
240 Kiribati,
242 Comoros,
244 SaintKittsAndNevis,
246 KoreaDemocraticPeoplesRepublic,
248 KoreaRepublic,
250 Kuwait,
252 CaymanIslands,
254 Kazakhstan,
256 LaoPeoplesDemocraticRepublic,
258 Lebanon,
260 SaintLucia,
262 Liechtenstein,
264 SriLanka,
266 Liberia,
268 Lesotho,
270 Lithuania,
272 Luxembourg,
274 Latvia,
276 Libya,
278 Morocco,
280 Monaco,
282 MoldovaRepublic,
284 Montenegro,
286 SaintMartinFrenchPart,
288 Madagascar,
290 MarshallIslands,
292 NorthMacedonia,
294 Mali,
296 Myanmar,
298 Mongolia,
300 Macao,
302 NorthernMarianaIslands,
304 Martinique,
306 Mauritania,
308 Montserrat,
310 Malta,
312 Mauritius,
314 Maldives,
316 Malawi,
318 Mexico,
320 Malaysia,
322 Mozambique,
324 Namibia,
326 NewCaledonia,
328 Niger,
330 NorfolkIsland,
332 Nigeria,
334 Nicaragua,
336 Netherlands,
338 Norway,
340 Nepal,
342 Nauru,
344 Niue,
346 NewZealand,
348 Oman,
350 Panama,
352 Peru,
354 FrenchPolynesia,
356 PapuaNewGuinea,
358 Philippines,
360 Pakistan,
362 Poland,
364 SaintPierreAndMiquelon,
366 Pitcairn,
368 PuertoRico,
370 PalestineState,
372 Portugal,
374 Palau,
376 Paraguay,
378 Qatar,
380 Réunion,
382 Romania,
384 Serbia,
386 RussianFederation,
388 Rwanda,
390 SaudiArabia,
392 SolomonIslands,
394 Seychelles,
396 Sudan,
398 Sweden,
400 Singapore,
402 SaintHelenaAscensionAndTristanDaCunha,
404 Slovenia,
406 SvalbardAndJanMayen,
408 Slovakia,
410 SierraLeone,
412 SanMarino,
414 Senegal,
416 Somalia,
418 Suriname,
420 SouthSudan,
422 SaoTomeAndPrincipe,
424 ElSalvador,
426 SintMaartenDutchPart,
428 SyrianArabRepublic,
430 Eswatini,
432 TurksAndCaicosIslands,
434 Chad,
436 FrenchSouthernTerritories,
438 Togo,
440 Thailand,
442 Tajikistan,
444 Tokelau,
446 TimorLeste,
448 Turkmenistan,
450 Tunisia,
452 Tonga,
454 Türkiye,
456 TrinidadAndTobago,
458 Tuvalu,
460 TaiwanProvinceChina,
462 TanzaniaUnitedRepublic,
464 Ukraine,
466 Uganda,
468 UnitedStatesMinorOutlyingIslands,
470 UnitedStatesAmerica,
472 Uruguay,
474 Uzbekistan,
476 HolySee,
478 SaintVincentAndGrenadines,
480 VenezuelaBolivarianRepublic,
482 VirginIslandsBritish,
484 VirginIslandsUS,
486 VietNam,
488 Vanuatu,
490 WallisAndFutuna,
492 Samoa,
494 Yemen,
496 Mayotte,
498 SouthAfrica,
500 Zambia,
502 Zimbabwe,
504 Kosovo,
506 UnitedKingdomNorthernIreland,
508}
509
510impl crate::Code for Country {
511 fn code(self) -> &'static str {
512 match self {
513 Country::Andorra => "AD",
514 Country::UnitedArabEmirates => "AE",
515 Country::Afghanistan => "AF",
516 Country::AntiguaAndBarbuda => "AG",
517 Country::Anguilla => "AI",
518 Country::Albania => "AL",
519 Country::Armenia => "AM",
520 Country::Angola => "AO",
521 Country::Antarctica => "AQ",
522 Country::Argentina => "AR",
523 Country::AmericanSamoa => "AS",
524 Country::Austria => "AT",
525 Country::Australia => "AU",
526 Country::Aruba => "AW",
527 Country::ÅlandIslands => "AX",
528 Country::Azerbaijan => "AZ",
529 Country::BosniaAndHerzegovina => "BA",
530 Country::Barbados => "BB",
531 Country::Bangladesh => "BD",
532 Country::Belgium => "BE",
533 Country::BurkinaFaso => "BF",
534 Country::Bulgaria => "BG",
535 Country::Bahrain => "BH",
536 Country::Burundi => "BI",
537 Country::Benin => "BJ",
538 Country::SaintBarthélemy => "BL",
539 Country::Bermuda => "BM",
540 Country::BruneiDarussalam => "BN",
541 Country::BoliviaPlurinationalState => "BO",
542 Country::BonaireSintEustatiusAndSaba => "BQ",
543 Country::Brazil => "BR",
544 Country::Bahamas => "BS",
545 Country::Bhutan => "BT",
546 Country::BouvetIsland => "BV",
547 Country::Botswana => "BW",
548 Country::Belarus => "BY",
549 Country::Belize => "BZ",
550 Country::Canada => "CA",
551 Country::CocosKeelingIslands => "CC",
552 Country::CongoDemocraticRepublic => "CD",
553 Country::CentralAfricanRepublic => "CF",
554 Country::Congo => "CG",
555 Country::Switzerland => "CH",
556 Country::CôteDivoire => "CI",
557 Country::CookIslands => "CK",
558 Country::Chile => "CL",
559 Country::Cameroon => "CM",
560 Country::China => "CN",
561 Country::Colombia => "CO",
562 Country::CostaRica => "CR",
563 Country::Cuba => "CU",
564 Country::CaboVerde => "CV",
565 Country::Curaçao => "CW",
566 Country::ChristmasIsland => "CX",
567 Country::Cyprus => "CY",
568 Country::Czechia => "CZ",
569 Country::Germany => "DE",
570 Country::Djibouti => "DJ",
571 Country::Denmark => "DK",
572 Country::Dominica => "DM",
573 Country::DominicanRepublic => "DO",
574 Country::Algeria => "DZ",
575 Country::Ecuador => "EC",
576 Country::Estonia => "EE",
577 Country::Egypt => "EG",
578 Country::WesternSahara => "EH",
579 Country::Eritrea => "ER",
580 Country::Spain => "ES",
581 Country::Ethiopia => "ET",
582 Country::Finland => "FI",
583 Country::Fiji => "FJ",
584 Country::FalklandIslandsMalvinas => "FK",
585 Country::MicronesiaFederatedStates => "FM",
586 Country::FaroeIslands => "FO",
587 Country::France => "FR",
588 Country::Gabon => "GA",
589 Country::UnitedKingdomGreatBritainAndNorthernIreland => "GB",
590 Country::Grenada => "GD",
591 Country::Georgia => "GE",
592 Country::FrenchGuiana => "GF",
593 Country::Guernsey => "GG",
594 Country::Ghana => "GH",
595 Country::Gibraltar => "GI",
596 Country::Greenland => "GL",
597 Country::Gambia => "GM",
598 Country::Guinea => "GN",
599 Country::Guadeloupe => "GP",
600 Country::EquatorialGuinea => "GQ",
601 Country::Greece => "GR",
602 Country::SouthGeorgiaAndSouthSandwichIslands => "GS",
603 Country::Guatemala => "GT",
604 Country::Guam => "GU",
605 Country::GuineaBissau => "GW",
606 Country::Guyana => "GY",
607 Country::HongKong => "HK",
608 Country::HeardIslandAndMcdonaldIslands => "HM",
609 Country::Honduras => "HN",
610 Country::Croatia => "HR",
611 Country::Haiti => "HT",
612 Country::Hungary => "HU",
613 Country::Indonesia => "ID",
614 Country::Ireland => "IE",
615 Country::Israel => "IL",
616 Country::IsleMan => "IM",
617 Country::India => "IN",
618 Country::BritishIndianOceanTerritory => "IO",
619 Country::Iraq => "IQ",
620 Country::IranIslamicRepublic => "IR",
621 Country::Iceland => "IS",
622 Country::Italy => "IT",
623 Country::Jersey => "JE",
624 Country::Jamaica => "JM",
625 Country::Jordan => "JO",
626 Country::Japan => "JP",
627 Country::Kenya => "KE",
628 Country::Kyrgyzstan => "KG",
629 Country::Cambodia => "KH",
630 Country::Kiribati => "KI",
631 Country::Comoros => "KM",
632 Country::SaintKittsAndNevis => "KN",
633 Country::KoreaDemocraticPeoplesRepublic => "KP",
634 Country::KoreaRepublic => "KR",
635 Country::Kuwait => "KW",
636 Country::CaymanIslands => "KY",
637 Country::Kazakhstan => "KZ",
638 Country::LaoPeoplesDemocraticRepublic => "LA",
639 Country::Lebanon => "LB",
640 Country::SaintLucia => "LC",
641 Country::Liechtenstein => "LI",
642 Country::SriLanka => "LK",
643 Country::Liberia => "LR",
644 Country::Lesotho => "LS",
645 Country::Lithuania => "LT",
646 Country::Luxembourg => "LU",
647 Country::Latvia => "LV",
648 Country::Libya => "LY",
649 Country::Morocco => "MA",
650 Country::Monaco => "MC",
651 Country::MoldovaRepublic => "MD",
652 Country::Montenegro => "ME",
653 Country::SaintMartinFrenchPart => "MF",
654 Country::Madagascar => "MG",
655 Country::MarshallIslands => "MH",
656 Country::NorthMacedonia => "MK",
657 Country::Mali => "ML",
658 Country::Myanmar => "MM",
659 Country::Mongolia => "MN",
660 Country::Macao => "MO",
661 Country::NorthernMarianaIslands => "MP",
662 Country::Martinique => "MQ",
663 Country::Mauritania => "MR",
664 Country::Montserrat => "MS",
665 Country::Malta => "MT",
666 Country::Mauritius => "MU",
667 Country::Maldives => "MV",
668 Country::Malawi => "MW",
669 Country::Mexico => "MX",
670 Country::Malaysia => "MY",
671 Country::Mozambique => "MZ",
672 Country::Namibia => "NA",
673 Country::NewCaledonia => "NC",
674 Country::Niger => "NE",
675 Country::NorfolkIsland => "NF",
676 Country::Nigeria => "NG",
677 Country::Nicaragua => "NI",
678 Country::Netherlands => "NL",
679 Country::Norway => "NO",
680 Country::Nepal => "NP",
681 Country::Nauru => "NR",
682 Country::Niue => "NU",
683 Country::NewZealand => "NZ",
684 Country::Oman => "OM",
685 Country::Panama => "PA",
686 Country::Peru => "PE",
687 Country::FrenchPolynesia => "PF",
688 Country::PapuaNewGuinea => "PG",
689 Country::Philippines => "PH",
690 Country::Pakistan => "PK",
691 Country::Poland => "PL",
692 Country::SaintPierreAndMiquelon => "PM",
693 Country::Pitcairn => "PN",
694 Country::PuertoRico => "PR",
695 Country::PalestineState => "PS",
696 Country::Portugal => "PT",
697 Country::Palau => "PW",
698 Country::Paraguay => "PY",
699 Country::Qatar => "QA",
700 Country::Réunion => "RE",
701 Country::Romania => "RO",
702 Country::Serbia => "RS",
703 Country::RussianFederation => "RU",
704 Country::Rwanda => "RW",
705 Country::SaudiArabia => "SA",
706 Country::SolomonIslands => "SB",
707 Country::Seychelles => "SC",
708 Country::Sudan => "SD",
709 Country::Sweden => "SE",
710 Country::Singapore => "SG",
711 Country::SaintHelenaAscensionAndTristanDaCunha => "SH",
712 Country::Slovenia => "SI",
713 Country::SvalbardAndJanMayen => "SJ",
714 Country::Slovakia => "SK",
715 Country::SierraLeone => "SL",
716 Country::SanMarino => "SM",
717 Country::Senegal => "SN",
718 Country::Somalia => "SO",
719 Country::Suriname => "SR",
720 Country::SouthSudan => "SS",
721 Country::SaoTomeAndPrincipe => "ST",
722 Country::ElSalvador => "SV",
723 Country::SintMaartenDutchPart => "SX",
724 Country::SyrianArabRepublic => "SY",
725 Country::Eswatini => "SZ",
726 Country::TurksAndCaicosIslands => "TC",
727 Country::Chad => "TD",
728 Country::FrenchSouthernTerritories => "TF",
729 Country::Togo => "TG",
730 Country::Thailand => "TH",
731 Country::Tajikistan => "TJ",
732 Country::Tokelau => "TK",
733 Country::TimorLeste => "TL",
734 Country::Turkmenistan => "TM",
735 Country::Tunisia => "TN",
736 Country::Tonga => "TO",
737 Country::Türkiye => "TR",
738 Country::TrinidadAndTobago => "TT",
739 Country::Tuvalu => "TV",
740 Country::TaiwanProvinceChina => "TW",
741 Country::TanzaniaUnitedRepublic => "TZ",
742 Country::Ukraine => "UA",
743 Country::Uganda => "UG",
744 Country::UnitedStatesMinorOutlyingIslands => "UM",
745 Country::UnitedStatesAmerica => "US",
746 Country::Uruguay => "UY",
747 Country::Uzbekistan => "UZ",
748 Country::HolySee => "VA",
749 Country::SaintVincentAndGrenadines => "VC",
750 Country::VenezuelaBolivarianRepublic => "VE",
751 Country::VirginIslandsBritish => "VG",
752 Country::VirginIslandsUS => "VI",
753 Country::VietNam => "VN",
754 Country::Vanuatu => "VU",
755 Country::WallisAndFutuna => "WF",
756 Country::Samoa => "WS",
757 Country::Yemen => "YE",
758 Country::Mayotte => "YT",
759 Country::SouthAfrica => "ZA",
760 Country::Zambia => "ZM",
761 Country::Zimbabwe => "ZW",
762 Country::Kosovo => "1A",
763 Country::UnitedKingdomNorthernIreland => "XI",
764 }
765 }
766}
767
768impl crate::Description for Country {
769 fn description(self) -> &'static str {
770 match self {
771 Country::Andorra => "Andorra",
772 Country::UnitedArabEmirates => "United Arab Emirates (the)",
773 Country::Afghanistan => "Afghanistan",
774 Country::AntiguaAndBarbuda => "Antigua and Barbuda",
775 Country::Anguilla => "Anguilla",
776 Country::Albania => "Albania",
777 Country::Armenia => "Armenia",
778 Country::Angola => "Angola",
779 Country::Antarctica => "Antarctica",
780 Country::Argentina => "Argentina",
781 Country::AmericanSamoa => "American Samoa",
782 Country::Austria => "Austria",
783 Country::Australia => "Australia",
784 Country::Aruba => "Aruba",
785 Country::ÅlandIslands => "Åland Islands",
786 Country::Azerbaijan => "Azerbaijan",
787 Country::BosniaAndHerzegovina => "Bosnia and Herzegovina",
788 Country::Barbados => "Barbados",
789 Country::Bangladesh => "Bangladesh",
790 Country::Belgium => "Belgium",
791 Country::BurkinaFaso => "Burkina Faso",
792 Country::Bulgaria => "Bulgaria",
793 Country::Bahrain => "Bahrain",
794 Country::Burundi => "Burundi",
795 Country::Benin => "Benin",
796 Country::SaintBarthélemy => "Saint Barthélemy",
797 Country::Bermuda => "Bermuda",
798 Country::BruneiDarussalam => "Brunei Darussalam",
799 Country::BoliviaPlurinationalState => "Bolivia (Plurinational State of)",
800 Country::BonaireSintEustatiusAndSaba => "Bonaire, Sint Eustatius and Saba",
801 Country::Brazil => "Brazil",
802 Country::Bahamas => "Bahamas (the)",
803 Country::Bhutan => "Bhutan",
804 Country::BouvetIsland => "Bouvet Island",
805 Country::Botswana => "Botswana",
806 Country::Belarus => "Belarus",
807 Country::Belize => "Belize",
808 Country::Canada => "Canada",
809 Country::CocosKeelingIslands => "Cocos (Keeling) Islands (the)",
810 Country::CongoDemocraticRepublic => "Congo (the Democratic Republic of the)",
811 Country::CentralAfricanRepublic => "Central African Republic (the)",
812 Country::Congo => "Congo (the)",
813 Country::Switzerland => "Switzerland",
814 Country::CôteDivoire => "Côte d'Ivoire",
815 Country::CookIslands => "Cook Islands (the)",
816 Country::Chile => "Chile",
817 Country::Cameroon => "Cameroon",
818 Country::China => "China",
819 Country::Colombia => "Colombia",
820 Country::CostaRica => "Costa Rica",
821 Country::Cuba => "Cuba",
822 Country::CaboVerde => "Cabo Verde",
823 Country::Curaçao => "Curaçao",
824 Country::ChristmasIsland => "Christmas Island",
825 Country::Cyprus => "Cyprus",
826 Country::Czechia => "Czechia",
827 Country::Germany => "Germany",
828 Country::Djibouti => "Djibouti",
829 Country::Denmark => "Denmark",
830 Country::Dominica => "Dominica",
831 Country::DominicanRepublic => "Dominican Republic (the)",
832 Country::Algeria => "Algeria",
833 Country::Ecuador => "Ecuador",
834 Country::Estonia => "Estonia",
835 Country::Egypt => "Egypt",
836 Country::WesternSahara => "Western Sahara*",
837 Country::Eritrea => "Eritrea",
838 Country::Spain => "Spain",
839 Country::Ethiopia => "Ethiopia",
840 Country::Finland => "Finland",
841 Country::Fiji => "Fiji",
842 Country::FalklandIslandsMalvinas => "Falkland Islands (the) [Malvinas]",
843 Country::MicronesiaFederatedStates => "Micronesia (Federated States of)",
844 Country::FaroeIslands => "Faroe Islands (the)",
845 Country::France => "France",
846 Country::Gabon => "Gabon",
847 Country::UnitedKingdomGreatBritainAndNorthernIreland => {
848 "United Kingdom of Great Britain and Northern Ireland (the)"
849 }
850 Country::Grenada => "Grenada",
851 Country::Georgia => "Georgia",
852 Country::FrenchGuiana => "French Guiana",
853 Country::Guernsey => "Guernsey",
854 Country::Ghana => "Ghana",
855 Country::Gibraltar => "Gibraltar",
856 Country::Greenland => "Greenland",
857 Country::Gambia => "Gambia (the)",
858 Country::Guinea => "Guinea",
859 Country::Guadeloupe => "Guadeloupe",
860 Country::EquatorialGuinea => "Equatorial Guinea",
861 Country::Greece => "Greece",
862 Country::SouthGeorgiaAndSouthSandwichIslands => {
863 "South Georgia and the South Sandwich Islands"
864 }
865 Country::Guatemala => "Guatemala",
866 Country::Guam => "Guam",
867 Country::GuineaBissau => "Guinea-Bissau",
868 Country::Guyana => "Guyana",
869 Country::HongKong => "Hong Kong",
870 Country::HeardIslandAndMcdonaldIslands => "Heard Island and McDonald Islands",
871 Country::Honduras => "Honduras",
872 Country::Croatia => "Croatia",
873 Country::Haiti => "Haiti",
874 Country::Hungary => "Hungary",
875 Country::Indonesia => "Indonesia",
876 Country::Ireland => "Ireland",
877 Country::Israel => "Israel",
878 Country::IsleMan => "Isle of Man",
879 Country::India => "India",
880 Country::BritishIndianOceanTerritory => "British Indian Ocean Territory (the)",
881 Country::Iraq => "Iraq",
882 Country::IranIslamicRepublic => "Iran (Islamic Republic of)",
883 Country::Iceland => "Iceland",
884 Country::Italy => "Italy",
885 Country::Jersey => "Jersey",
886 Country::Jamaica => "Jamaica",
887 Country::Jordan => "Jordan",
888 Country::Japan => "Japan",
889 Country::Kenya => "Kenya",
890 Country::Kyrgyzstan => "Kyrgyzstan",
891 Country::Cambodia => "Cambodia",
892 Country::Kiribati => "Kiribati",
893 Country::Comoros => "Comoros (the)",
894 Country::SaintKittsAndNevis => "Saint Kitts and Nevis",
895 Country::KoreaDemocraticPeoplesRepublic => {
896 "Korea (the Democratic People's Republic of)"
897 }
898 Country::KoreaRepublic => "Korea (the Republic of)",
899 Country::Kuwait => "Kuwait",
900 Country::CaymanIslands => "Cayman Islands (the)",
901 Country::Kazakhstan => "Kazakhstan",
902 Country::LaoPeoplesDemocraticRepublic => "Lao People's Democratic Republic (the)",
903 Country::Lebanon => "Lebanon",
904 Country::SaintLucia => "Saint Lucia",
905 Country::Liechtenstein => "Liechtenstein",
906 Country::SriLanka => "Sri Lanka",
907 Country::Liberia => "Liberia",
908 Country::Lesotho => "Lesotho",
909 Country::Lithuania => "Lithuania",
910 Country::Luxembourg => "Luxembourg",
911 Country::Latvia => "Latvia",
912 Country::Libya => "Libya",
913 Country::Morocco => "Morocco",
914 Country::Monaco => "Monaco",
915 Country::MoldovaRepublic => "Moldova (the Republic of)",
916 Country::Montenegro => "Montenegro",
917 Country::SaintMartinFrenchPart => "Saint Martin (French part)",
918 Country::Madagascar => "Madagascar",
919 Country::MarshallIslands => "Marshall Islands (the)",
920 Country::NorthMacedonia => "North Macedonia",
921 Country::Mali => "Mali",
922 Country::Myanmar => "Myanmar",
923 Country::Mongolia => "Mongolia",
924 Country::Macao => "Macao",
925 Country::NorthernMarianaIslands => "Northern Mariana Islands (the)",
926 Country::Martinique => "Martinique",
927 Country::Mauritania => "Mauritania",
928 Country::Montserrat => "Montserrat",
929 Country::Malta => "Malta",
930 Country::Mauritius => "Mauritius",
931 Country::Maldives => "Maldives",
932 Country::Malawi => "Malawi",
933 Country::Mexico => "Mexico",
934 Country::Malaysia => "Malaysia",
935 Country::Mozambique => "Mozambique",
936 Country::Namibia => "Namibia",
937 Country::NewCaledonia => "New Caledonia",
938 Country::Niger => "Niger (the)",
939 Country::NorfolkIsland => "Norfolk Island",
940 Country::Nigeria => "Nigeria",
941 Country::Nicaragua => "Nicaragua",
942 Country::Netherlands => "Netherlands (the)",
943 Country::Norway => "Norway",
944 Country::Nepal => "Nepal",
945 Country::Nauru => "Nauru",
946 Country::Niue => "Niue",
947 Country::NewZealand => "New Zealand",
948 Country::Oman => "Oman",
949 Country::Panama => "Panama",
950 Country::Peru => "Peru",
951 Country::FrenchPolynesia => "French Polynesia",
952 Country::PapuaNewGuinea => "Papua New Guinea",
953 Country::Philippines => "Philippines (the)",
954 Country::Pakistan => "Pakistan",
955 Country::Poland => "Poland",
956 Country::SaintPierreAndMiquelon => "Saint Pierre and Miquelon",
957 Country::Pitcairn => "Pitcairn",
958 Country::PuertoRico => "Puerto Rico",
959 Country::PalestineState => "Palestine, State of",
960 Country::Portugal => "Portugal",
961 Country::Palau => "Palau",
962 Country::Paraguay => "Paraguay",
963 Country::Qatar => "Qatar",
964 Country::Réunion => "Réunion",
965 Country::Romania => "Romania",
966 Country::Serbia => "Serbia",
967 Country::RussianFederation => "Russian Federation (the)",
968 Country::Rwanda => "Rwanda",
969 Country::SaudiArabia => "Saudi Arabia",
970 Country::SolomonIslands => "Solomon Islands",
971 Country::Seychelles => "Seychelles",
972 Country::Sudan => "Sudan (the)",
973 Country::Sweden => "Sweden",
974 Country::Singapore => "Singapore",
975 Country::SaintHelenaAscensionAndTristanDaCunha => {
976 "Saint Helena, Ascension and Tristan da Cunha"
977 }
978 Country::Slovenia => "Slovenia",
979 Country::SvalbardAndJanMayen => "Svalbard and Jan Mayen",
980 Country::Slovakia => "Slovakia",
981 Country::SierraLeone => "Sierra Leone",
982 Country::SanMarino => "San Marino",
983 Country::Senegal => "Senegal",
984 Country::Somalia => "Somalia",
985 Country::Suriname => "Suriname",
986 Country::SouthSudan => "South Sudan",
987 Country::SaoTomeAndPrincipe => "Sao Tome and Principe",
988 Country::ElSalvador => "El Salvador",
989 Country::SintMaartenDutchPart => "Sint Maarten (Dutch part)",
990 Country::SyrianArabRepublic => "Syrian Arab Republic (the)",
991 Country::Eswatini => "Eswatini",
992 Country::TurksAndCaicosIslands => "Turks and Caicos Islands (the)",
993 Country::Chad => "Chad",
994 Country::FrenchSouthernTerritories => "French Southern Territories (the)",
995 Country::Togo => "Togo",
996 Country::Thailand => "Thailand",
997 Country::Tajikistan => "Tajikistan",
998 Country::Tokelau => "Tokelau",
999 Country::TimorLeste => "Timor-Leste",
1000 Country::Turkmenistan => "Turkmenistan",
1001 Country::Tunisia => "Tunisia",
1002 Country::Tonga => "Tonga",
1003 Country::Türkiye => "Türkiye",
1004 Country::TrinidadAndTobago => "Trinidad and Tobago",
1005 Country::Tuvalu => "Tuvalu",
1006 Country::TaiwanProvinceChina => "Taiwan (Province of China)",
1007 Country::TanzaniaUnitedRepublic => "Tanzania, the United Republic of",
1008 Country::Ukraine => "Ukraine",
1009 Country::Uganda => "Uganda",
1010 Country::UnitedStatesMinorOutlyingIslands => {
1011 "United States Minor Outlying Islands (the)"
1012 }
1013 Country::UnitedStatesAmerica => "United States of America (the)",
1014 Country::Uruguay => "Uruguay",
1015 Country::Uzbekistan => "Uzbekistan",
1016 Country::HolySee => "Holy See (the)",
1017 Country::SaintVincentAndGrenadines => "Saint Vincent and the Grenadines",
1018 Country::VenezuelaBolivarianRepublic => "Venezuela (Bolivarian Republic of)",
1019 Country::VirginIslandsBritish => "Virgin Islands (British)",
1020 Country::VirginIslandsUS => "Virgin Islands (U.S.)",
1021 Country::VietNam => "Viet Nam",
1022 Country::Vanuatu => "Vanuatu",
1023 Country::WallisAndFutuna => "Wallis and Futuna",
1024 Country::Samoa => "Samoa",
1025 Country::Yemen => "Yemen",
1026 Country::Mayotte => "Mayotte",
1027 Country::SouthAfrica => "South Africa",
1028 Country::Zambia => "Zambia",
1029 Country::Zimbabwe => "Zimbabwe",
1030 Country::Kosovo => "Kosovo",
1031 Country::UnitedKingdomNorthernIreland => "United Kingdom (Northern Ireland)",
1032 }
1033 }
1034}
1035
1036impl crate::FromCode for Country {
1037 fn from_code(code: &str) -> Option<Self>
1038 where
1039 Self: Sized,
1040 {
1041 match code {
1042 "AD" => Some(Country::Andorra),
1043 "AE" => Some(Country::UnitedArabEmirates),
1044 "AF" => Some(Country::Afghanistan),
1045 "AG" => Some(Country::AntiguaAndBarbuda),
1046 "AI" => Some(Country::Anguilla),
1047 "AL" => Some(Country::Albania),
1048 "AM" => Some(Country::Armenia),
1049 "AO" => Some(Country::Angola),
1050 "AQ" => Some(Country::Antarctica),
1051 "AR" => Some(Country::Argentina),
1052 "AS" => Some(Country::AmericanSamoa),
1053 "AT" => Some(Country::Austria),
1054 "AU" => Some(Country::Australia),
1055 "AW" => Some(Country::Aruba),
1056 "AX" => Some(Country::ÅlandIslands),
1057 "AZ" => Some(Country::Azerbaijan),
1058 "BA" => Some(Country::BosniaAndHerzegovina),
1059 "BB" => Some(Country::Barbados),
1060 "BD" => Some(Country::Bangladesh),
1061 "BE" => Some(Country::Belgium),
1062 "BF" => Some(Country::BurkinaFaso),
1063 "BG" => Some(Country::Bulgaria),
1064 "BH" => Some(Country::Bahrain),
1065 "BI" => Some(Country::Burundi),
1066 "BJ" => Some(Country::Benin),
1067 "BL" => Some(Country::SaintBarthélemy),
1068 "BM" => Some(Country::Bermuda),
1069 "BN" => Some(Country::BruneiDarussalam),
1070 "BO" => Some(Country::BoliviaPlurinationalState),
1071 "BQ" => Some(Country::BonaireSintEustatiusAndSaba),
1072 "BR" => Some(Country::Brazil),
1073 "BS" => Some(Country::Bahamas),
1074 "BT" => Some(Country::Bhutan),
1075 "BV" => Some(Country::BouvetIsland),
1076 "BW" => Some(Country::Botswana),
1077 "BY" => Some(Country::Belarus),
1078 "BZ" => Some(Country::Belize),
1079 "CA" => Some(Country::Canada),
1080 "CC" => Some(Country::CocosKeelingIslands),
1081 "CD" => Some(Country::CongoDemocraticRepublic),
1082 "CF" => Some(Country::CentralAfricanRepublic),
1083 "CG" => Some(Country::Congo),
1084 "CH" => Some(Country::Switzerland),
1085 "CI" => Some(Country::CôteDivoire),
1086 "CK" => Some(Country::CookIslands),
1087 "CL" => Some(Country::Chile),
1088 "CM" => Some(Country::Cameroon),
1089 "CN" => Some(Country::China),
1090 "CO" => Some(Country::Colombia),
1091 "CR" => Some(Country::CostaRica),
1092 "CU" => Some(Country::Cuba),
1093 "CV" => Some(Country::CaboVerde),
1094 "CW" => Some(Country::Curaçao),
1095 "CX" => Some(Country::ChristmasIsland),
1096 "CY" => Some(Country::Cyprus),
1097 "CZ" => Some(Country::Czechia),
1098 "DE" => Some(Country::Germany),
1099 "DJ" => Some(Country::Djibouti),
1100 "DK" => Some(Country::Denmark),
1101 "DM" => Some(Country::Dominica),
1102 "DO" => Some(Country::DominicanRepublic),
1103 "DZ" => Some(Country::Algeria),
1104 "EC" => Some(Country::Ecuador),
1105 "EE" => Some(Country::Estonia),
1106 "EG" => Some(Country::Egypt),
1107 "EH" => Some(Country::WesternSahara),
1108 "ER" => Some(Country::Eritrea),
1109 "ES" => Some(Country::Spain),
1110 "ET" => Some(Country::Ethiopia),
1111 "FI" => Some(Country::Finland),
1112 "FJ" => Some(Country::Fiji),
1113 "FK" => Some(Country::FalklandIslandsMalvinas),
1114 "FM" => Some(Country::MicronesiaFederatedStates),
1115 "FO" => Some(Country::FaroeIslands),
1116 "FR" => Some(Country::France),
1117 "GA" => Some(Country::Gabon),
1118 "GB" => Some(Country::UnitedKingdomGreatBritainAndNorthernIreland),
1119 "GD" => Some(Country::Grenada),
1120 "GE" => Some(Country::Georgia),
1121 "GF" => Some(Country::FrenchGuiana),
1122 "GG" => Some(Country::Guernsey),
1123 "GH" => Some(Country::Ghana),
1124 "GI" => Some(Country::Gibraltar),
1125 "GL" => Some(Country::Greenland),
1126 "GM" => Some(Country::Gambia),
1127 "GN" => Some(Country::Guinea),
1128 "GP" => Some(Country::Guadeloupe),
1129 "GQ" => Some(Country::EquatorialGuinea),
1130 "GR" => Some(Country::Greece),
1131 "GS" => Some(Country::SouthGeorgiaAndSouthSandwichIslands),
1132 "GT" => Some(Country::Guatemala),
1133 "GU" => Some(Country::Guam),
1134 "GW" => Some(Country::GuineaBissau),
1135 "GY" => Some(Country::Guyana),
1136 "HK" => Some(Country::HongKong),
1137 "HM" => Some(Country::HeardIslandAndMcdonaldIslands),
1138 "HN" => Some(Country::Honduras),
1139 "HR" => Some(Country::Croatia),
1140 "HT" => Some(Country::Haiti),
1141 "HU" => Some(Country::Hungary),
1142 "ID" => Some(Country::Indonesia),
1143 "IE" => Some(Country::Ireland),
1144 "IL" => Some(Country::Israel),
1145 "IM" => Some(Country::IsleMan),
1146 "IN" => Some(Country::India),
1147 "IO" => Some(Country::BritishIndianOceanTerritory),
1148 "IQ" => Some(Country::Iraq),
1149 "IR" => Some(Country::IranIslamicRepublic),
1150 "IS" => Some(Country::Iceland),
1151 "IT" => Some(Country::Italy),
1152 "JE" => Some(Country::Jersey),
1153 "JM" => Some(Country::Jamaica),
1154 "JO" => Some(Country::Jordan),
1155 "JP" => Some(Country::Japan),
1156 "KE" => Some(Country::Kenya),
1157 "KG" => Some(Country::Kyrgyzstan),
1158 "KH" => Some(Country::Cambodia),
1159 "KI" => Some(Country::Kiribati),
1160 "KM" => Some(Country::Comoros),
1161 "KN" => Some(Country::SaintKittsAndNevis),
1162 "KP" => Some(Country::KoreaDemocraticPeoplesRepublic),
1163 "KR" => Some(Country::KoreaRepublic),
1164 "KW" => Some(Country::Kuwait),
1165 "KY" => Some(Country::CaymanIslands),
1166 "KZ" => Some(Country::Kazakhstan),
1167 "LA" => Some(Country::LaoPeoplesDemocraticRepublic),
1168 "LB" => Some(Country::Lebanon),
1169 "LC" => Some(Country::SaintLucia),
1170 "LI" => Some(Country::Liechtenstein),
1171 "LK" => Some(Country::SriLanka),
1172 "LR" => Some(Country::Liberia),
1173 "LS" => Some(Country::Lesotho),
1174 "LT" => Some(Country::Lithuania),
1175 "LU" => Some(Country::Luxembourg),
1176 "LV" => Some(Country::Latvia),
1177 "LY" => Some(Country::Libya),
1178 "MA" => Some(Country::Morocco),
1179 "MC" => Some(Country::Monaco),
1180 "MD" => Some(Country::MoldovaRepublic),
1181 "ME" => Some(Country::Montenegro),
1182 "MF" => Some(Country::SaintMartinFrenchPart),
1183 "MG" => Some(Country::Madagascar),
1184 "MH" => Some(Country::MarshallIslands),
1185 "MK" => Some(Country::NorthMacedonia),
1186 "ML" => Some(Country::Mali),
1187 "MM" => Some(Country::Myanmar),
1188 "MN" => Some(Country::Mongolia),
1189 "MO" => Some(Country::Macao),
1190 "MP" => Some(Country::NorthernMarianaIslands),
1191 "MQ" => Some(Country::Martinique),
1192 "MR" => Some(Country::Mauritania),
1193 "MS" => Some(Country::Montserrat),
1194 "MT" => Some(Country::Malta),
1195 "MU" => Some(Country::Mauritius),
1196 "MV" => Some(Country::Maldives),
1197 "MW" => Some(Country::Malawi),
1198 "MX" => Some(Country::Mexico),
1199 "MY" => Some(Country::Malaysia),
1200 "MZ" => Some(Country::Mozambique),
1201 "NA" => Some(Country::Namibia),
1202 "NC" => Some(Country::NewCaledonia),
1203 "NE" => Some(Country::Niger),
1204 "NF" => Some(Country::NorfolkIsland),
1205 "NG" => Some(Country::Nigeria),
1206 "NI" => Some(Country::Nicaragua),
1207 "NL" => Some(Country::Netherlands),
1208 "NO" => Some(Country::Norway),
1209 "NP" => Some(Country::Nepal),
1210 "NR" => Some(Country::Nauru),
1211 "NU" => Some(Country::Niue),
1212 "NZ" => Some(Country::NewZealand),
1213 "OM" => Some(Country::Oman),
1214 "PA" => Some(Country::Panama),
1215 "PE" => Some(Country::Peru),
1216 "PF" => Some(Country::FrenchPolynesia),
1217 "PG" => Some(Country::PapuaNewGuinea),
1218 "PH" => Some(Country::Philippines),
1219 "PK" => Some(Country::Pakistan),
1220 "PL" => Some(Country::Poland),
1221 "PM" => Some(Country::SaintPierreAndMiquelon),
1222 "PN" => Some(Country::Pitcairn),
1223 "PR" => Some(Country::PuertoRico),
1224 "PS" => Some(Country::PalestineState),
1225 "PT" => Some(Country::Portugal),
1226 "PW" => Some(Country::Palau),
1227 "PY" => Some(Country::Paraguay),
1228 "QA" => Some(Country::Qatar),
1229 "RE" => Some(Country::Réunion),
1230 "RO" => Some(Country::Romania),
1231 "RS" => Some(Country::Serbia),
1232 "RU" => Some(Country::RussianFederation),
1233 "RW" => Some(Country::Rwanda),
1234 "SA" => Some(Country::SaudiArabia),
1235 "SB" => Some(Country::SolomonIslands),
1236 "SC" => Some(Country::Seychelles),
1237 "SD" => Some(Country::Sudan),
1238 "SE" => Some(Country::Sweden),
1239 "SG" => Some(Country::Singapore),
1240 "SH" => Some(Country::SaintHelenaAscensionAndTristanDaCunha),
1241 "SI" => Some(Country::Slovenia),
1242 "SJ" => Some(Country::SvalbardAndJanMayen),
1243 "SK" => Some(Country::Slovakia),
1244 "SL" => Some(Country::SierraLeone),
1245 "SM" => Some(Country::SanMarino),
1246 "SN" => Some(Country::Senegal),
1247 "SO" => Some(Country::Somalia),
1248 "SR" => Some(Country::Suriname),
1249 "SS" => Some(Country::SouthSudan),
1250 "ST" => Some(Country::SaoTomeAndPrincipe),
1251 "SV" => Some(Country::ElSalvador),
1252 "SX" => Some(Country::SintMaartenDutchPart),
1253 "SY" => Some(Country::SyrianArabRepublic),
1254 "SZ" => Some(Country::Eswatini),
1255 "TC" => Some(Country::TurksAndCaicosIslands),
1256 "TD" => Some(Country::Chad),
1257 "TF" => Some(Country::FrenchSouthernTerritories),
1258 "TG" => Some(Country::Togo),
1259 "TH" => Some(Country::Thailand),
1260 "TJ" => Some(Country::Tajikistan),
1261 "TK" => Some(Country::Tokelau),
1262 "TL" => Some(Country::TimorLeste),
1263 "TM" => Some(Country::Turkmenistan),
1264 "TN" => Some(Country::Tunisia),
1265 "TO" => Some(Country::Tonga),
1266 "TR" => Some(Country::Türkiye),
1267 "TT" => Some(Country::TrinidadAndTobago),
1268 "TV" => Some(Country::Tuvalu),
1269 "TW" => Some(Country::TaiwanProvinceChina),
1270 "TZ" => Some(Country::TanzaniaUnitedRepublic),
1271 "UA" => Some(Country::Ukraine),
1272 "UG" => Some(Country::Uganda),
1273 "UM" => Some(Country::UnitedStatesMinorOutlyingIslands),
1274 "US" => Some(Country::UnitedStatesAmerica),
1275 "UY" => Some(Country::Uruguay),
1276 "UZ" => Some(Country::Uzbekistan),
1277 "VA" => Some(Country::HolySee),
1278 "VC" => Some(Country::SaintVincentAndGrenadines),
1279 "VE" => Some(Country::VenezuelaBolivarianRepublic),
1280 "VG" => Some(Country::VirginIslandsBritish),
1281 "VI" => Some(Country::VirginIslandsUS),
1282 "VN" => Some(Country::VietNam),
1283 "VU" => Some(Country::Vanuatu),
1284 "WF" => Some(Country::WallisAndFutuna),
1285 "WS" => Some(Country::Samoa),
1286 "YE" => Some(Country::Yemen),
1287 "YT" => Some(Country::Mayotte),
1288 "ZA" => Some(Country::SouthAfrica),
1289 "ZM" => Some(Country::Zambia),
1290 "ZW" => Some(Country::Zimbabwe),
1291 "1A" => Some(Country::Kosovo),
1292 "XI" => Some(Country::UnitedKingdomNorthernIreland),
1293 _ => None,
1294 }
1295 }
1296}
1297
1298#[cfg(feature = "iso_country")]
1299impl std::convert::TryFrom<Country> for iso_country::Country {
1300 type Error = ErrFromCountry;
1301 fn try_from(value: Country) -> Result<Self, Self::Error> {
1302 match value {
1303 Country::Andorra => Ok(iso_country::Country::AD),
1304 Country::UnitedArabEmirates => Ok(iso_country::Country::AE),
1305 Country::Afghanistan => Ok(iso_country::Country::AF),
1306 Country::AntiguaAndBarbuda => Ok(iso_country::Country::AG),
1307 Country::Anguilla => Ok(iso_country::Country::AI),
1308 Country::Albania => Ok(iso_country::Country::AL),
1309 Country::Armenia => Ok(iso_country::Country::AM),
1310 Country::Angola => Ok(iso_country::Country::AO),
1311 Country::Antarctica => Ok(iso_country::Country::AQ),
1312 Country::Argentina => Ok(iso_country::Country::AR),
1313 Country::AmericanSamoa => Ok(iso_country::Country::AS),
1314 Country::Austria => Ok(iso_country::Country::AT),
1315 Country::Australia => Ok(iso_country::Country::AU),
1316 Country::Aruba => Ok(iso_country::Country::AW),
1317 Country::ÅlandIslands => Ok(iso_country::Country::AX),
1318 Country::Azerbaijan => Ok(iso_country::Country::AZ),
1319 Country::BosniaAndHerzegovina => Ok(iso_country::Country::BA),
1320 Country::Barbados => Ok(iso_country::Country::BB),
1321 Country::Bangladesh => Ok(iso_country::Country::BD),
1322 Country::Belgium => Ok(iso_country::Country::BE),
1323 Country::BurkinaFaso => Ok(iso_country::Country::BF),
1324 Country::Bulgaria => Ok(iso_country::Country::BG),
1325 Country::Bahrain => Ok(iso_country::Country::BH),
1326 Country::Burundi => Ok(iso_country::Country::BI),
1327 Country::Benin => Ok(iso_country::Country::BJ),
1328 Country::SaintBarthélemy => Ok(iso_country::Country::BL),
1329 Country::Bermuda => Ok(iso_country::Country::BM),
1330 Country::BruneiDarussalam => Ok(iso_country::Country::BN),
1331 Country::BoliviaPlurinationalState => Ok(iso_country::Country::BO),
1332 Country::BonaireSintEustatiusAndSaba => Ok(iso_country::Country::BQ),
1333 Country::Brazil => Ok(iso_country::Country::BR),
1334 Country::Bahamas => Ok(iso_country::Country::BS),
1335 Country::Bhutan => Ok(iso_country::Country::BT),
1336 Country::BouvetIsland => Ok(iso_country::Country::BV),
1337 Country::Botswana => Ok(iso_country::Country::BW),
1338 Country::Belarus => Ok(iso_country::Country::BY),
1339 Country::Belize => Ok(iso_country::Country::BZ),
1340 Country::Canada => Ok(iso_country::Country::CA),
1341 Country::CocosKeelingIslands => Ok(iso_country::Country::CC),
1342 Country::CongoDemocraticRepublic => Ok(iso_country::Country::CD),
1343 Country::CentralAfricanRepublic => Ok(iso_country::Country::CF),
1344 Country::Congo => Ok(iso_country::Country::CG),
1345 Country::Switzerland => Ok(iso_country::Country::CH),
1346 Country::CôteDivoire => Ok(iso_country::Country::CI),
1347 Country::CookIslands => Ok(iso_country::Country::CK),
1348 Country::Chile => Ok(iso_country::Country::CL),
1349 Country::Cameroon => Ok(iso_country::Country::CM),
1350 Country::China => Ok(iso_country::Country::CN),
1351 Country::Colombia => Ok(iso_country::Country::CO),
1352 Country::CostaRica => Ok(iso_country::Country::CR),
1353 Country::Cuba => Ok(iso_country::Country::CU),
1354 Country::CaboVerde => Ok(iso_country::Country::CV),
1355 Country::Curaçao => Ok(iso_country::Country::CW),
1356 Country::ChristmasIsland => Ok(iso_country::Country::CX),
1357 Country::Cyprus => Ok(iso_country::Country::CY),
1358 Country::Czechia => Ok(iso_country::Country::CZ),
1359 Country::Germany => Ok(iso_country::Country::DE),
1360 Country::Djibouti => Ok(iso_country::Country::DJ),
1361 Country::Denmark => Ok(iso_country::Country::DK),
1362 Country::Dominica => Ok(iso_country::Country::DM),
1363 Country::DominicanRepublic => Ok(iso_country::Country::DO),
1364 Country::Algeria => Ok(iso_country::Country::DZ),
1365 Country::Ecuador => Ok(iso_country::Country::EC),
1366 Country::Estonia => Ok(iso_country::Country::EE),
1367 Country::Egypt => Ok(iso_country::Country::EG),
1368 Country::WesternSahara => Ok(iso_country::Country::EH),
1369 Country::Eritrea => Ok(iso_country::Country::ER),
1370 Country::Spain => Ok(iso_country::Country::ES),
1371 Country::Ethiopia => Ok(iso_country::Country::ET),
1372 Country::Finland => Ok(iso_country::Country::FI),
1373 Country::Fiji => Ok(iso_country::Country::FJ),
1374 Country::FalklandIslandsMalvinas => Ok(iso_country::Country::FK),
1375 Country::MicronesiaFederatedStates => Ok(iso_country::Country::FM),
1376 Country::FaroeIslands => Ok(iso_country::Country::FO),
1377 Country::France => Ok(iso_country::Country::FR),
1378 Country::Gabon => Ok(iso_country::Country::GA),
1379 Country::UnitedKingdomGreatBritainAndNorthernIreland => Ok(iso_country::Country::GB),
1380 Country::Grenada => Ok(iso_country::Country::GD),
1381 Country::Georgia => Ok(iso_country::Country::GE),
1382 Country::FrenchGuiana => Ok(iso_country::Country::GF),
1383 Country::Guernsey => Ok(iso_country::Country::GG),
1384 Country::Ghana => Ok(iso_country::Country::GH),
1385 Country::Gibraltar => Ok(iso_country::Country::GI),
1386 Country::Greenland => Ok(iso_country::Country::GL),
1387 Country::Gambia => Ok(iso_country::Country::GM),
1388 Country::Guinea => Ok(iso_country::Country::GN),
1389 Country::Guadeloupe => Ok(iso_country::Country::GP),
1390 Country::EquatorialGuinea => Ok(iso_country::Country::GQ),
1391 Country::Greece => Ok(iso_country::Country::GR),
1392 Country::SouthGeorgiaAndSouthSandwichIslands => Ok(iso_country::Country::GS),
1393 Country::Guatemala => Ok(iso_country::Country::GT),
1394 Country::Guam => Ok(iso_country::Country::GU),
1395 Country::GuineaBissau => Ok(iso_country::Country::GW),
1396 Country::Guyana => Ok(iso_country::Country::GY),
1397 Country::HongKong => Ok(iso_country::Country::HK),
1398 Country::HeardIslandAndMcdonaldIslands => Ok(iso_country::Country::HM),
1399 Country::Honduras => Ok(iso_country::Country::HN),
1400 Country::Croatia => Ok(iso_country::Country::HR),
1401 Country::Haiti => Ok(iso_country::Country::HT),
1402 Country::Hungary => Ok(iso_country::Country::HU),
1403 Country::Indonesia => Ok(iso_country::Country::ID),
1404 Country::Ireland => Ok(iso_country::Country::IE),
1405 Country::Israel => Ok(iso_country::Country::IL),
1406 Country::IsleMan => Ok(iso_country::Country::IM),
1407 Country::India => Ok(iso_country::Country::IN),
1408 Country::BritishIndianOceanTerritory => Ok(iso_country::Country::IO),
1409 Country::Iraq => Ok(iso_country::Country::IQ),
1410 Country::IranIslamicRepublic => Ok(iso_country::Country::IR),
1411 Country::Iceland => Ok(iso_country::Country::IS),
1412 Country::Italy => Ok(iso_country::Country::IT),
1413 Country::Jersey => Ok(iso_country::Country::JE),
1414 Country::Jamaica => Ok(iso_country::Country::JM),
1415 Country::Jordan => Ok(iso_country::Country::JO),
1416 Country::Japan => Ok(iso_country::Country::JP),
1417 Country::Kenya => Ok(iso_country::Country::KE),
1418 Country::Kyrgyzstan => Ok(iso_country::Country::KG),
1419 Country::Cambodia => Ok(iso_country::Country::KH),
1420 Country::Kiribati => Ok(iso_country::Country::KI),
1421 Country::Comoros => Ok(iso_country::Country::KM),
1422 Country::SaintKittsAndNevis => Ok(iso_country::Country::KN),
1423 Country::KoreaDemocraticPeoplesRepublic => Ok(iso_country::Country::KP),
1424 Country::KoreaRepublic => Ok(iso_country::Country::KR),
1425 Country::Kuwait => Ok(iso_country::Country::KW),
1426 Country::CaymanIslands => Ok(iso_country::Country::KY),
1427 Country::Kazakhstan => Ok(iso_country::Country::KZ),
1428 Country::LaoPeoplesDemocraticRepublic => Ok(iso_country::Country::LA),
1429 Country::Lebanon => Ok(iso_country::Country::LB),
1430 Country::SaintLucia => Ok(iso_country::Country::LC),
1431 Country::Liechtenstein => Ok(iso_country::Country::LI),
1432 Country::SriLanka => Ok(iso_country::Country::LK),
1433 Country::Liberia => Ok(iso_country::Country::LR),
1434 Country::Lesotho => Ok(iso_country::Country::LS),
1435 Country::Lithuania => Ok(iso_country::Country::LT),
1436 Country::Luxembourg => Ok(iso_country::Country::LU),
1437 Country::Latvia => Ok(iso_country::Country::LV),
1438 Country::Libya => Ok(iso_country::Country::LY),
1439 Country::Morocco => Ok(iso_country::Country::MA),
1440 Country::Monaco => Ok(iso_country::Country::MC),
1441 Country::MoldovaRepublic => Ok(iso_country::Country::MD),
1442 Country::Montenegro => Ok(iso_country::Country::ME),
1443 Country::SaintMartinFrenchPart => Ok(iso_country::Country::MF),
1444 Country::Madagascar => Ok(iso_country::Country::MG),
1445 Country::MarshallIslands => Ok(iso_country::Country::MH),
1446 Country::NorthMacedonia => Ok(iso_country::Country::MK),
1447 Country::Mali => Ok(iso_country::Country::ML),
1448 Country::Myanmar => Ok(iso_country::Country::MM),
1449 Country::Mongolia => Ok(iso_country::Country::MN),
1450 Country::Macao => Ok(iso_country::Country::MO),
1451 Country::NorthernMarianaIslands => Ok(iso_country::Country::MP),
1452 Country::Martinique => Ok(iso_country::Country::MQ),
1453 Country::Mauritania => Ok(iso_country::Country::MR),
1454 Country::Montserrat => Ok(iso_country::Country::MS),
1455 Country::Malta => Ok(iso_country::Country::MT),
1456 Country::Mauritius => Ok(iso_country::Country::MU),
1457 Country::Maldives => Ok(iso_country::Country::MV),
1458 Country::Malawi => Ok(iso_country::Country::MW),
1459 Country::Mexico => Ok(iso_country::Country::MX),
1460 Country::Malaysia => Ok(iso_country::Country::MY),
1461 Country::Mozambique => Ok(iso_country::Country::MZ),
1462 Country::Namibia => Ok(iso_country::Country::NA),
1463 Country::NewCaledonia => Ok(iso_country::Country::NC),
1464 Country::Niger => Ok(iso_country::Country::NE),
1465 Country::NorfolkIsland => Ok(iso_country::Country::NF),
1466 Country::Nigeria => Ok(iso_country::Country::NG),
1467 Country::Nicaragua => Ok(iso_country::Country::NI),
1468 Country::Netherlands => Ok(iso_country::Country::NL),
1469 Country::Norway => Ok(iso_country::Country::NO),
1470 Country::Nepal => Ok(iso_country::Country::NP),
1471 Country::Nauru => Ok(iso_country::Country::NR),
1472 Country::Niue => Ok(iso_country::Country::NU),
1473 Country::NewZealand => Ok(iso_country::Country::NZ),
1474 Country::Oman => Ok(iso_country::Country::OM),
1475 Country::Panama => Ok(iso_country::Country::PA),
1476 Country::Peru => Ok(iso_country::Country::PE),
1477 Country::FrenchPolynesia => Ok(iso_country::Country::PF),
1478 Country::PapuaNewGuinea => Ok(iso_country::Country::PG),
1479 Country::Philippines => Ok(iso_country::Country::PH),
1480 Country::Pakistan => Ok(iso_country::Country::PK),
1481 Country::Poland => Ok(iso_country::Country::PL),
1482 Country::SaintPierreAndMiquelon => Ok(iso_country::Country::PM),
1483 Country::Pitcairn => Ok(iso_country::Country::PN),
1484 Country::PuertoRico => Ok(iso_country::Country::PR),
1485 Country::PalestineState => Ok(iso_country::Country::PS),
1486 Country::Portugal => Ok(iso_country::Country::PT),
1487 Country::Palau => Ok(iso_country::Country::PW),
1488 Country::Paraguay => Ok(iso_country::Country::PY),
1489 Country::Qatar => Ok(iso_country::Country::QA),
1490 Country::Réunion => Ok(iso_country::Country::RE),
1491 Country::Romania => Ok(iso_country::Country::RO),
1492 Country::Serbia => Ok(iso_country::Country::RS),
1493 Country::RussianFederation => Ok(iso_country::Country::RU),
1494 Country::Rwanda => Ok(iso_country::Country::RW),
1495 Country::SaudiArabia => Ok(iso_country::Country::SA),
1496 Country::SolomonIslands => Ok(iso_country::Country::SB),
1497 Country::Seychelles => Ok(iso_country::Country::SC),
1498 Country::Sudan => Ok(iso_country::Country::SD),
1499 Country::Sweden => Ok(iso_country::Country::SE),
1500 Country::Singapore => Ok(iso_country::Country::SG),
1501 Country::SaintHelenaAscensionAndTristanDaCunha => Ok(iso_country::Country::SH),
1502 Country::Slovenia => Ok(iso_country::Country::SI),
1503 Country::SvalbardAndJanMayen => Ok(iso_country::Country::SJ),
1504 Country::Slovakia => Ok(iso_country::Country::SK),
1505 Country::SierraLeone => Ok(iso_country::Country::SL),
1506 Country::SanMarino => Ok(iso_country::Country::SM),
1507 Country::Senegal => Ok(iso_country::Country::SN),
1508 Country::Somalia => Ok(iso_country::Country::SO),
1509 Country::Suriname => Ok(iso_country::Country::SR),
1510 Country::SouthSudan => Ok(iso_country::Country::SS),
1511 Country::SaoTomeAndPrincipe => Ok(iso_country::Country::ST),
1512 Country::ElSalvador => Ok(iso_country::Country::SV),
1513 Country::SintMaartenDutchPart => Ok(iso_country::Country::SX),
1514 Country::SyrianArabRepublic => Ok(iso_country::Country::SY),
1515 Country::Eswatini => Ok(iso_country::Country::SZ),
1516 Country::TurksAndCaicosIslands => Ok(iso_country::Country::TC),
1517 Country::Chad => Ok(iso_country::Country::TD),
1518 Country::FrenchSouthernTerritories => Ok(iso_country::Country::TF),
1519 Country::Togo => Ok(iso_country::Country::TG),
1520 Country::Thailand => Ok(iso_country::Country::TH),
1521 Country::Tajikistan => Ok(iso_country::Country::TJ),
1522 Country::Tokelau => Ok(iso_country::Country::TK),
1523 Country::TimorLeste => Ok(iso_country::Country::TL),
1524 Country::Turkmenistan => Ok(iso_country::Country::TM),
1525 Country::Tunisia => Ok(iso_country::Country::TN),
1526 Country::Tonga => Ok(iso_country::Country::TO),
1527 Country::Türkiye => Ok(iso_country::Country::TR),
1528 Country::TrinidadAndTobago => Ok(iso_country::Country::TT),
1529 Country::Tuvalu => Ok(iso_country::Country::TV),
1530 Country::TaiwanProvinceChina => Ok(iso_country::Country::TW),
1531 Country::TanzaniaUnitedRepublic => Ok(iso_country::Country::TZ),
1532 Country::Ukraine => Ok(iso_country::Country::UA),
1533 Country::Uganda => Ok(iso_country::Country::UG),
1534 Country::UnitedStatesMinorOutlyingIslands => Ok(iso_country::Country::UM),
1535 Country::UnitedStatesAmerica => Ok(iso_country::Country::US),
1536 Country::Uruguay => Ok(iso_country::Country::UY),
1537 Country::Uzbekistan => Ok(iso_country::Country::UZ),
1538 Country::HolySee => Ok(iso_country::Country::VA),
1539 Country::SaintVincentAndGrenadines => Ok(iso_country::Country::VC),
1540 Country::VenezuelaBolivarianRepublic => Ok(iso_country::Country::VE),
1541 Country::VirginIslandsBritish => Ok(iso_country::Country::VG),
1542 Country::VirginIslandsUS => Ok(iso_country::Country::VI),
1543 Country::VietNam => Ok(iso_country::Country::VN),
1544 Country::Vanuatu => Ok(iso_country::Country::VU),
1545 Country::WallisAndFutuna => Ok(iso_country::Country::WF),
1546 Country::Samoa => Ok(iso_country::Country::WS),
1547 Country::Yemen => Ok(iso_country::Country::YE),
1548 Country::Mayotte => Ok(iso_country::Country::YT),
1549 Country::SouthAfrica => Ok(iso_country::Country::ZA),
1550 Country::Zambia => Ok(iso_country::Country::ZM),
1551 Country::Zimbabwe => Ok(iso_country::Country::ZW),
1552 Country::Kosovo => Err(ErrFromCountry::Kosovo),
1553 Country::UnitedKingdomNorthernIreland => {
1554 Err(ErrFromCountry::UnitedKingdomNorthernIreland)
1555 }
1556 }
1557 }
1558}
1559
1560#[cfg(feature = "iso_country")]
1561#[derive(Debug, PartialEq, Eq, Hash)]
1563pub enum ErrFromCountry {
1564 Kosovo,
1565 UnitedKingdomNorthernIreland,
1566}
1567
1568#[cfg(feature = "iso_country")]
1569impl std::fmt::Display for ErrFromCountry {
1570 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1571 match self {
1572 ErrFromCountry::Kosovo => write!(
1573 f,
1574 "Kosovo has no corresponding value in iso_country::Country"
1575 ),
1576 ErrFromCountry::UnitedKingdomNorthernIreland => write!(
1577 f,
1578 "UnitedKingdomNorthernIreland has no corresponding value in iso_country::Country"
1579 ),
1580 }
1581 }
1582}
1583
1584#[cfg(feature = "iso_country")]
1585impl std::error::Error for ErrFromCountry {}
1586
1587#[cfg(feature = "iso_country")]
1588impl std::convert::TryFrom<iso_country::Country> for Country {
1589 type Error = ErrFromIsoCountryCountry;
1590 fn try_from(value: iso_country::Country) -> Result<Country, Self::Error> {
1591 match value {
1592 iso_country::Country::AD => Ok(Country::Andorra),
1593 iso_country::Country::AE => Ok(Country::UnitedArabEmirates),
1594 iso_country::Country::AF => Ok(Country::Afghanistan),
1595 iso_country::Country::AG => Ok(Country::AntiguaAndBarbuda),
1596 iso_country::Country::AI => Ok(Country::Anguilla),
1597 iso_country::Country::AL => Ok(Country::Albania),
1598 iso_country::Country::AM => Ok(Country::Armenia),
1599 iso_country::Country::AO => Ok(Country::Angola),
1600 iso_country::Country::AQ => Ok(Country::Antarctica),
1601 iso_country::Country::AR => Ok(Country::Argentina),
1602 iso_country::Country::AS => Ok(Country::AmericanSamoa),
1603 iso_country::Country::AT => Ok(Country::Austria),
1604 iso_country::Country::AU => Ok(Country::Australia),
1605 iso_country::Country::AW => Ok(Country::Aruba),
1606 iso_country::Country::AX => Ok(Country::ÅlandIslands),
1607 iso_country::Country::AZ => Ok(Country::Azerbaijan),
1608 iso_country::Country::BA => Ok(Country::BosniaAndHerzegovina),
1609 iso_country::Country::BB => Ok(Country::Barbados),
1610 iso_country::Country::BD => Ok(Country::Bangladesh),
1611 iso_country::Country::BE => Ok(Country::Belgium),
1612 iso_country::Country::BF => Ok(Country::BurkinaFaso),
1613 iso_country::Country::BG => Ok(Country::Bulgaria),
1614 iso_country::Country::BH => Ok(Country::Bahrain),
1615 iso_country::Country::BI => Ok(Country::Burundi),
1616 iso_country::Country::BJ => Ok(Country::Benin),
1617 iso_country::Country::BL => Ok(Country::SaintBarthélemy),
1618 iso_country::Country::BM => Ok(Country::Bermuda),
1619 iso_country::Country::BN => Ok(Country::BruneiDarussalam),
1620 iso_country::Country::BO => Ok(Country::BoliviaPlurinationalState),
1621 iso_country::Country::BQ => Ok(Country::BonaireSintEustatiusAndSaba),
1622 iso_country::Country::BR => Ok(Country::Brazil),
1623 iso_country::Country::BS => Ok(Country::Bahamas),
1624 iso_country::Country::BT => Ok(Country::Bhutan),
1625 iso_country::Country::BV => Ok(Country::BouvetIsland),
1626 iso_country::Country::BW => Ok(Country::Botswana),
1627 iso_country::Country::BY => Ok(Country::Belarus),
1628 iso_country::Country::BZ => Ok(Country::Belize),
1629 iso_country::Country::CA => Ok(Country::Canada),
1630 iso_country::Country::CC => Ok(Country::CocosKeelingIslands),
1631 iso_country::Country::CD => Ok(Country::CongoDemocraticRepublic),
1632 iso_country::Country::CF => Ok(Country::CentralAfricanRepublic),
1633 iso_country::Country::CG => Ok(Country::Congo),
1634 iso_country::Country::CH => Ok(Country::Switzerland),
1635 iso_country::Country::CI => Ok(Country::CôteDivoire),
1636 iso_country::Country::CK => Ok(Country::CookIslands),
1637 iso_country::Country::CL => Ok(Country::Chile),
1638 iso_country::Country::CM => Ok(Country::Cameroon),
1639 iso_country::Country::CN => Ok(Country::China),
1640 iso_country::Country::CO => Ok(Country::Colombia),
1641 iso_country::Country::CR => Ok(Country::CostaRica),
1642 iso_country::Country::CU => Ok(Country::Cuba),
1643 iso_country::Country::CV => Ok(Country::CaboVerde),
1644 iso_country::Country::CW => Ok(Country::Curaçao),
1645 iso_country::Country::CX => Ok(Country::ChristmasIsland),
1646 iso_country::Country::CY => Ok(Country::Cyprus),
1647 iso_country::Country::CZ => Ok(Country::Czechia),
1648 iso_country::Country::DE => Ok(Country::Germany),
1649 iso_country::Country::DJ => Ok(Country::Djibouti),
1650 iso_country::Country::DK => Ok(Country::Denmark),
1651 iso_country::Country::DM => Ok(Country::Dominica),
1652 iso_country::Country::DO => Ok(Country::DominicanRepublic),
1653 iso_country::Country::DZ => Ok(Country::Algeria),
1654 iso_country::Country::EC => Ok(Country::Ecuador),
1655 iso_country::Country::EE => Ok(Country::Estonia),
1656 iso_country::Country::EG => Ok(Country::Egypt),
1657 iso_country::Country::EH => Ok(Country::WesternSahara),
1658 iso_country::Country::ER => Ok(Country::Eritrea),
1659 iso_country::Country::ES => Ok(Country::Spain),
1660 iso_country::Country::ET => Ok(Country::Ethiopia),
1661 iso_country::Country::FI => Ok(Country::Finland),
1662 iso_country::Country::FJ => Ok(Country::Fiji),
1663 iso_country::Country::FK => Ok(Country::FalklandIslandsMalvinas),
1664 iso_country::Country::FM => Ok(Country::MicronesiaFederatedStates),
1665 iso_country::Country::FO => Ok(Country::FaroeIslands),
1666 iso_country::Country::FR => Ok(Country::France),
1667 iso_country::Country::GA => Ok(Country::Gabon),
1668 iso_country::Country::GB => Ok(Country::UnitedKingdomGreatBritainAndNorthernIreland),
1669 iso_country::Country::GD => Ok(Country::Grenada),
1670 iso_country::Country::GE => Ok(Country::Georgia),
1671 iso_country::Country::GF => Ok(Country::FrenchGuiana),
1672 iso_country::Country::GG => Ok(Country::Guernsey),
1673 iso_country::Country::GH => Ok(Country::Ghana),
1674 iso_country::Country::GI => Ok(Country::Gibraltar),
1675 iso_country::Country::GL => Ok(Country::Greenland),
1676 iso_country::Country::GM => Ok(Country::Gambia),
1677 iso_country::Country::GN => Ok(Country::Guinea),
1678 iso_country::Country::GP => Ok(Country::Guadeloupe),
1679 iso_country::Country::GQ => Ok(Country::EquatorialGuinea),
1680 iso_country::Country::GR => Ok(Country::Greece),
1681 iso_country::Country::GS => Ok(Country::SouthGeorgiaAndSouthSandwichIslands),
1682 iso_country::Country::GT => Ok(Country::Guatemala),
1683 iso_country::Country::GU => Ok(Country::Guam),
1684 iso_country::Country::GW => Ok(Country::GuineaBissau),
1685 iso_country::Country::GY => Ok(Country::Guyana),
1686 iso_country::Country::HK => Ok(Country::HongKong),
1687 iso_country::Country::HM => Ok(Country::HeardIslandAndMcdonaldIslands),
1688 iso_country::Country::HN => Ok(Country::Honduras),
1689 iso_country::Country::HR => Ok(Country::Croatia),
1690 iso_country::Country::HT => Ok(Country::Haiti),
1691 iso_country::Country::HU => Ok(Country::Hungary),
1692 iso_country::Country::ID => Ok(Country::Indonesia),
1693 iso_country::Country::IE => Ok(Country::Ireland),
1694 iso_country::Country::IL => Ok(Country::Israel),
1695 iso_country::Country::IM => Ok(Country::IsleMan),
1696 iso_country::Country::IN => Ok(Country::India),
1697 iso_country::Country::IO => Ok(Country::BritishIndianOceanTerritory),
1698 iso_country::Country::IQ => Ok(Country::Iraq),
1699 iso_country::Country::IR => Ok(Country::IranIslamicRepublic),
1700 iso_country::Country::IS => Ok(Country::Iceland),
1701 iso_country::Country::IT => Ok(Country::Italy),
1702 iso_country::Country::JE => Ok(Country::Jersey),
1703 iso_country::Country::JM => Ok(Country::Jamaica),
1704 iso_country::Country::JO => Ok(Country::Jordan),
1705 iso_country::Country::JP => Ok(Country::Japan),
1706 iso_country::Country::KE => Ok(Country::Kenya),
1707 iso_country::Country::KG => Ok(Country::Kyrgyzstan),
1708 iso_country::Country::KH => Ok(Country::Cambodia),
1709 iso_country::Country::KI => Ok(Country::Kiribati),
1710 iso_country::Country::KM => Ok(Country::Comoros),
1711 iso_country::Country::KN => Ok(Country::SaintKittsAndNevis),
1712 iso_country::Country::KP => Ok(Country::KoreaDemocraticPeoplesRepublic),
1713 iso_country::Country::KR => Ok(Country::KoreaRepublic),
1714 iso_country::Country::KW => Ok(Country::Kuwait),
1715 iso_country::Country::KY => Ok(Country::CaymanIslands),
1716 iso_country::Country::KZ => Ok(Country::Kazakhstan),
1717 iso_country::Country::LA => Ok(Country::LaoPeoplesDemocraticRepublic),
1718 iso_country::Country::LB => Ok(Country::Lebanon),
1719 iso_country::Country::LC => Ok(Country::SaintLucia),
1720 iso_country::Country::LI => Ok(Country::Liechtenstein),
1721 iso_country::Country::LK => Ok(Country::SriLanka),
1722 iso_country::Country::LR => Ok(Country::Liberia),
1723 iso_country::Country::LS => Ok(Country::Lesotho),
1724 iso_country::Country::LT => Ok(Country::Lithuania),
1725 iso_country::Country::LU => Ok(Country::Luxembourg),
1726 iso_country::Country::LV => Ok(Country::Latvia),
1727 iso_country::Country::LY => Ok(Country::Libya),
1728 iso_country::Country::MA => Ok(Country::Morocco),
1729 iso_country::Country::MC => Ok(Country::Monaco),
1730 iso_country::Country::MD => Ok(Country::MoldovaRepublic),
1731 iso_country::Country::ME => Ok(Country::Montenegro),
1732 iso_country::Country::MF => Ok(Country::SaintMartinFrenchPart),
1733 iso_country::Country::MG => Ok(Country::Madagascar),
1734 iso_country::Country::MH => Ok(Country::MarshallIslands),
1735 iso_country::Country::MK => Ok(Country::NorthMacedonia),
1736 iso_country::Country::ML => Ok(Country::Mali),
1737 iso_country::Country::MM => Ok(Country::Myanmar),
1738 iso_country::Country::MN => Ok(Country::Mongolia),
1739 iso_country::Country::MO => Ok(Country::Macao),
1740 iso_country::Country::MP => Ok(Country::NorthernMarianaIslands),
1741 iso_country::Country::MQ => Ok(Country::Martinique),
1742 iso_country::Country::MR => Ok(Country::Mauritania),
1743 iso_country::Country::MS => Ok(Country::Montserrat),
1744 iso_country::Country::MT => Ok(Country::Malta),
1745 iso_country::Country::MU => Ok(Country::Mauritius),
1746 iso_country::Country::MV => Ok(Country::Maldives),
1747 iso_country::Country::MW => Ok(Country::Malawi),
1748 iso_country::Country::MX => Ok(Country::Mexico),
1749 iso_country::Country::MY => Ok(Country::Malaysia),
1750 iso_country::Country::MZ => Ok(Country::Mozambique),
1751 iso_country::Country::NA => Ok(Country::Namibia),
1752 iso_country::Country::NC => Ok(Country::NewCaledonia),
1753 iso_country::Country::NE => Ok(Country::Niger),
1754 iso_country::Country::NF => Ok(Country::NorfolkIsland),
1755 iso_country::Country::NG => Ok(Country::Nigeria),
1756 iso_country::Country::NI => Ok(Country::Nicaragua),
1757 iso_country::Country::NL => Ok(Country::Netherlands),
1758 iso_country::Country::NO => Ok(Country::Norway),
1759 iso_country::Country::NP => Ok(Country::Nepal),
1760 iso_country::Country::NR => Ok(Country::Nauru),
1761 iso_country::Country::NU => Ok(Country::Niue),
1762 iso_country::Country::NZ => Ok(Country::NewZealand),
1763 iso_country::Country::OM => Ok(Country::Oman),
1764 iso_country::Country::PA => Ok(Country::Panama),
1765 iso_country::Country::PE => Ok(Country::Peru),
1766 iso_country::Country::PF => Ok(Country::FrenchPolynesia),
1767 iso_country::Country::PG => Ok(Country::PapuaNewGuinea),
1768 iso_country::Country::PH => Ok(Country::Philippines),
1769 iso_country::Country::PK => Ok(Country::Pakistan),
1770 iso_country::Country::PL => Ok(Country::Poland),
1771 iso_country::Country::PM => Ok(Country::SaintPierreAndMiquelon),
1772 iso_country::Country::PN => Ok(Country::Pitcairn),
1773 iso_country::Country::PR => Ok(Country::PuertoRico),
1774 iso_country::Country::PS => Ok(Country::PalestineState),
1775 iso_country::Country::PT => Ok(Country::Portugal),
1776 iso_country::Country::PW => Ok(Country::Palau),
1777 iso_country::Country::PY => Ok(Country::Paraguay),
1778 iso_country::Country::QA => Ok(Country::Qatar),
1779 iso_country::Country::RE => Ok(Country::Réunion),
1780 iso_country::Country::RO => Ok(Country::Romania),
1781 iso_country::Country::RS => Ok(Country::Serbia),
1782 iso_country::Country::RU => Ok(Country::RussianFederation),
1783 iso_country::Country::RW => Ok(Country::Rwanda),
1784 iso_country::Country::SA => Ok(Country::SaudiArabia),
1785 iso_country::Country::SB => Ok(Country::SolomonIslands),
1786 iso_country::Country::SC => Ok(Country::Seychelles),
1787 iso_country::Country::SD => Ok(Country::Sudan),
1788 iso_country::Country::SE => Ok(Country::Sweden),
1789 iso_country::Country::SG => Ok(Country::Singapore),
1790 iso_country::Country::SH => Ok(Country::SaintHelenaAscensionAndTristanDaCunha),
1791 iso_country::Country::SI => Ok(Country::Slovenia),
1792 iso_country::Country::SJ => Ok(Country::SvalbardAndJanMayen),
1793 iso_country::Country::SK => Ok(Country::Slovakia),
1794 iso_country::Country::SL => Ok(Country::SierraLeone),
1795 iso_country::Country::SM => Ok(Country::SanMarino),
1796 iso_country::Country::SN => Ok(Country::Senegal),
1797 iso_country::Country::SO => Ok(Country::Somalia),
1798 iso_country::Country::SR => Ok(Country::Suriname),
1799 iso_country::Country::SS => Ok(Country::SouthSudan),
1800 iso_country::Country::ST => Ok(Country::SaoTomeAndPrincipe),
1801 iso_country::Country::SV => Ok(Country::ElSalvador),
1802 iso_country::Country::SX => Ok(Country::SintMaartenDutchPart),
1803 iso_country::Country::SY => Ok(Country::SyrianArabRepublic),
1804 iso_country::Country::SZ => Ok(Country::Eswatini),
1805 iso_country::Country::TC => Ok(Country::TurksAndCaicosIslands),
1806 iso_country::Country::TD => Ok(Country::Chad),
1807 iso_country::Country::TF => Ok(Country::FrenchSouthernTerritories),
1808 iso_country::Country::TG => Ok(Country::Togo),
1809 iso_country::Country::TH => Ok(Country::Thailand),
1810 iso_country::Country::TJ => Ok(Country::Tajikistan),
1811 iso_country::Country::TK => Ok(Country::Tokelau),
1812 iso_country::Country::TL => Ok(Country::TimorLeste),
1813 iso_country::Country::TM => Ok(Country::Turkmenistan),
1814 iso_country::Country::TN => Ok(Country::Tunisia),
1815 iso_country::Country::TO => Ok(Country::Tonga),
1816 iso_country::Country::TR => Ok(Country::Türkiye),
1817 iso_country::Country::TT => Ok(Country::TrinidadAndTobago),
1818 iso_country::Country::TV => Ok(Country::Tuvalu),
1819 iso_country::Country::TW => Ok(Country::TaiwanProvinceChina),
1820 iso_country::Country::TZ => Ok(Country::TanzaniaUnitedRepublic),
1821 iso_country::Country::UA => Ok(Country::Ukraine),
1822 iso_country::Country::UG => Ok(Country::Uganda),
1823 iso_country::Country::UM => Ok(Country::UnitedStatesMinorOutlyingIslands),
1824 iso_country::Country::US => Ok(Country::UnitedStatesAmerica),
1825 iso_country::Country::UY => Ok(Country::Uruguay),
1826 iso_country::Country::UZ => Ok(Country::Uzbekistan),
1827 iso_country::Country::VA => Ok(Country::HolySee),
1828 iso_country::Country::VC => Ok(Country::SaintVincentAndGrenadines),
1829 iso_country::Country::VE => Ok(Country::VenezuelaBolivarianRepublic),
1830 iso_country::Country::VG => Ok(Country::VirginIslandsBritish),
1831 iso_country::Country::VI => Ok(Country::VirginIslandsUS),
1832 iso_country::Country::VN => Ok(Country::VietNam),
1833 iso_country::Country::VU => Ok(Country::Vanuatu),
1834 iso_country::Country::WF => Ok(Country::WallisAndFutuna),
1835 iso_country::Country::WS => Ok(Country::Samoa),
1836 iso_country::Country::YE => Ok(Country::Yemen),
1837 iso_country::Country::YT => Ok(Country::Mayotte),
1838 iso_country::Country::ZA => Ok(Country::SouthAfrica),
1839 iso_country::Country::ZM => Ok(Country::Zambia),
1840 iso_country::Country::ZW => Ok(Country::Zimbabwe),
1841 iso_country::Country::Unspecified => Err(ErrFromIsoCountryCountry::Unspecified),
1842 }
1843 }
1844}
1845
1846#[cfg(feature = "iso_country")]
1847#[derive(Debug, PartialEq, Eq, Hash)]
1849pub enum ErrFromIsoCountryCountry {
1850 Unspecified,
1851}
1852
1853#[cfg(feature = "iso_country")]
1854impl std::fmt::Display for ErrFromIsoCountryCountry {
1855 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1856 match self {
1857 ErrFromIsoCountryCountry::Unspecified => {
1858 write!(f, "Unspecified has no corresponding value in Country")
1859 }
1860 }
1861 }
1862}
1863
1864#[cfg(feature = "iso_country")]
1865impl std::error::Error for ErrFromIsoCountryCountry {}