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