pub enum SubRegion {
Show 22 variants
AustraliaAndNewZealand,
Caribbean,
CentralAmerica,
CentralAsia,
EasternAfrica,
EasternAsia,
EasternEurope,
Melanesia,
Micronesia,
MiddleAfrica,
NorthernAfrica,
NorthernAmerica,
NorthernEurope,
Polynesia,
SouthAmerica,
SouthEasternAsia,
SouthernAfrica,
SouthernAsia,
SouthernEurope,
WesternAfrica,
WesternAsia,
WesternEurope,
}Expand description
An enum containing sub-regions.
§Example
use keshvar::{SubRegion, Alpha2};
let sub_region = SubRegion::try_from("northern-america").unwrap();
let country_list: Vec<_> = sub_region
.alpha2_list()
.iter()
.map(|alpha2_str| Alpha2::try_from(*alpha2_str).unwrap())
.collect();
assert!(country_list.contains(&Alpha2::CA)); // CanadaWe usually need to convert Alpha2 to Country and use that object instead.
Variants§
AustraliaAndNewZealand
- The Commonwealth of Australia
- The Territory of Cocos (Keeling) Islands
- The Territory of Christmas Island
- The Territory of Norfolk Island
- New Zealand
Caribbean
- Antigua and Barbuda
- Anguilla
- Aruba
- Barbados
- The Collectivity of Saint-Barthélemy
- Bonaire, Sint Eustatius and Saba
- The Commonwealth of The Bahamas
- The Republic of Cuba
- The Country of Curaçao
- The Commonwealth of Dominica
- The Dominican Republic
- Grenada
- Guadeloupe
- The Republic of Haiti
- Jamaica
- Saint Kitts and Nevis
- The Cayman Islands
- Saint Lucia
- The Collectivity of Saint-Martin
- Martinique
- Montserrat
- The Commonwealth of Puerto Rico
- Sint Maarten
- The Turks and Caicos Islands
- The Republic of Trinidad and Tobago
- Saint Vincent and the Grenadines
- The Virgin Islands
- The Virgin Islands of the United States
CentralAmerica
- Belize
- The Republic of Costa Rica
- The Republic of Guatemala
- The Republic of Honduras
- The United Mexican States
- The Republic of Nicaragua
- The Republic of Panamá
- The Republic of El Salvador
CentralAsia
- The Kyrgyz Republic
- The Republic of Kazakhstan
- The Republic of Tajikistan
- Turkmenistan
- The Republic of Uzbekistan
EasternAfrica
- The Republic of Burundi
- The Republic of Djibouti
- The State of Eritrea
- The Federal Democratic Republic of Ethiopia
- The British Indian Ocean Territory
- The Republic of Kenya
- The Union of the Comoros
- The Republic of Madagascar
- The Republic of Mauritius
- The Republic of Malawi
- The Republic of Mozambique
- Réunion
- The Republic of Rwanda
- The Republic of Seychelles
- The Federal Republic of Somalia
- The French Southern and Antarctic Lands
- The United Republic of Tanzania
- The Republic of Uganda
- The Department of Mayotte
- The Republic of Zambia
- The Republic of Zimbabwe
EasternAsia
- The People’s Republic of China
- The Hong Kong Special Administrative Region of China
- Japan
- The Democratic People’s Republic of Korea
- The Republic of Korea
- Mongolia
- The Macao Special Administrative Region of China
- Taiwan, Province of China
EasternEurope
- The Republic of Bulgaria
- The Republic of Belarus
- The Czech Republic
- Hungary
- The Republic of Moldova
- The Republic of Poland
- Romania
- The Russian Federation
- The Slovak Republic
- Ukraine
Melanesia
- The Republic of Fiji
- New Caledonia
- The Independent State of Papua New Guinea
- The Solomon Islands
- The Republic of Vanuatu
Micronesia
- The Federated States of Micronesia
- The Territory of Guam
- The Republic of Kiribati
- The Republic of the Marshall Islands
- The Commonwealth of the Northern Mariana Islands
- The Republic of Nauru
- The Republic of Palau
MiddleAfrica
- The Republic of Angola
- The Democratic Republic of the Congo
- The Central African Republic
- The Republic of the Congo
- The Republic of Cameroon
- The Gabonese Republic
- The Republic of Equatorial Guinea
- The Democratic Republic of São Tomé and Príncipe
- The Republic of Chad
NorthernAfrica
- The People’s Democratic Republic of Algeria
- The Arab Republic of Egypt
- The Sahrawi Arab Democratic Republic
- The State of Libya
- The Kingdom of Morocco
- The Republic of the Sudan
- The Republic of South Sudan
- The Republic of Tunisia
NorthernAmerica
- Bermuda
- Canada
- Kalaallit Nunaat
- The Overseas Collectivity of Saint-Pierre and Miquelon
- United States Minor Outlying Islands
- The United States of America
NorthernEurope
- Åland
- The Kingdom of Denmark
- The Republic of Estonia
- The Republic of Finland
- The Faroe Islands
- The United Kingdom of Great Britain and Northern Ireland
- The Bailiwick of Guernsey
- Ireland
- The Isle of Man
- Iceland
- The Bailiwick of Jersey
- The Republic of Lithuania
- The Republic of Latvia
- The Kingdom of Norway
- The Kingdom of Sweden
- Svalbard and Jan Mayen
Polynesia
- The Territory of American Samoa
- The Cook Islands
- Niue
- French Polynesia
- The Pitcairn, Henderson, Ducie and Oeno Islands
- Tokelau
- The Kingdom of Tonga
- Tuvalu
- The Territory of the Wallis and Futuna Islands
- The Independent State of Samoa
SouthAmerica
- The Argentine Republic
- The Plurinational State of Bolivia
- The Federative Republic of Brazil
- The Republic of Chile
- The Republic of Colombia
- The Republic of Ecuador
- The Falkland Islands
- Guyane
- South Georgia and the South Sandwich Islands
- The Co-operative Republic of Guyana
- The Republic of Perú
- The Republic of Paraguay
- The Republic of Suriname
- The Oriental Republic of Uruguay
- The Bolivarian Republic of Venezuela
SouthEasternAsia
- The Nation of Brunei, the Abode of Peace
- The Republic of Indonesia
- The Kingdom of Cambodia
- The Lao People’s Democratic Republic
- The Republic of the Union of Myanmar
- Malaysia
- The Republic of the Philippines
- The Republic of Singapore
- The Kingdom of Thailand
- The Democratic Republic of Timor-Leste
- The Socialist Republic of Viet Nam
SouthernAfrica
- The Republic of Botswana
- The Kingdom of Lesotho
- The Republic of Namibia
- The Kingdom of Eswatini
- The Republic of South Africa
SouthernAsia
- The Islamic Republic of Afghanistan
- The People’s Republic of Bangladesh
- The Kingdom of Bhutan
- The Republic of India
- The Islamic Republic of Iran
- The Democratic Socialist Republic of Sri Lanka
- The Republic of Maldives
- The Federal Democratic Republic of Nepal
- The Islamic Republic of Pakistan
SouthernEurope
- The Principality of Andorra
- The Republic of Albania
- Bosnia and Herzegovina
- The Kingdom of Spain
- Gibraltar
- The Hellenic Republic
- The Republic of Croatia
- The Italian Republic
- Montenegro
- The Republic of North Macedonia
- The Republic of Malta
- The Portuguese Republic
- The Republic of Serbia
- The Republic of Slovenia
- The Republic of San Marino
- The Holy See
WesternAfrica
- Burkina Faso
- The Republic of Benin
- The Republic of Côte d’Ivoire
- The Republic of Cabo Verde
- The Republic of Ghana
- The Republic of The Gambia
- The Republic of Guinea
- The Republic of Guinea-Bissau
- The Republic of Liberia
- The Republic of Mali
- The Islamic Republic of Mauritania
- The Republic of the Niger
- The Federal Republic of Nigeria
- Saint Helena, Ascension and Tristan da Cunha
- The Republic of Sierra Leone
- The Republic of Senegal
- The Togolese Republic
WesternAsia
- The United Arab Emirates
- The Republic of Armenia
- The Republic of Azerbaijan
- The Kingdom of Bahrain
- The Republic of Cyprus
- Georgia
- The State of Israel
- The Republic of Iraq
- The Hashemite Kingdom of Jordan
- The State of Kuwait
- The Lebanese Republic
- The Sultanate of Oman
- The State of Palestine
- The State of Qatar
- The Kingdom of Saudi Arabia
- The Syrian Arab Republic
- The Republic of Türkiye
- The Republic of Yemen
WesternEurope
- The Republic of Austria
- The Kingdom of Belgium
- The Swiss Confederation
- The Federal Republic of Germany
- The French Republic
- The Principality of Liechtenstein
- The Grand Duchy of Luxembourg
- The Principality of Monaco
- The Kingdom of the Netherlands
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for SubRegion
impl<'de> Deserialize<'de> for SubRegion
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for SubRegion
impl PartialEq for SubRegion
impl Copy for SubRegion
impl StructuralPartialEq for SubRegion
Auto Trait Implementations§
impl RefUnwindSafe for SubRegion
impl Send for SubRegion
impl Sync for SubRegion
impl Unpin for SubRegion
impl UnwindSafe for SubRegion
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more