Skip to main content

Country

Enum Country 

pub enum Country {
Show 252 variants Andorra, UnitedArabEmirates, Afghanistan, AntiguaAndBarbuda, Anguilla, Albania, Armenia, Angola, Antarctica, Argentina, AmericanSamoa, Austria, Australia, Aruba, AlandIslands, Azerbaijan, BosniaAndHerzegovina, Barbados, Bangladesh, Belgium, BurkinaFaso, Bulgaria, Bahrain, Burundi, Benin, SaintBarthelemy, Bermuda, Brunei, Bolivia, BonaireSintEustatiusAndSaba, Brazil, Bahamas, Bhutan, BouvetIsland, Botswana, Belarus, Belize, Canada, CocosKeelingIslands, DemocraticRepublicOfTheCongo, CentralAfricanRepublic, Congo, Switzerland, CoteDIvoire, CookIslands, Chile, Cameroon, China, Colombia, CostaRica, Cuba, CapeVerde, Curacao, ChristmasIsland, Cyprus, CzechRepublic, Germany, Djibouti, Denmark, Dominica, DominicanRepublic, Algeria, Ecuador, Estonia, Egypt, WesternSahara, Eritrea, Spain, Ethiopia, EuropeanUnion, Finland, Fiji, FalklandIslands, Micronesia, FaroeIslands, France, Gabon, UnitedKingdom, Grenada, Georgia, FrenchGuiana, Guernsey, Ghana, Gibraltar, Greenland, Gambia, Guinea, Guadeloupe, EquatorialGuinea, Greece, SouthGeorgiaAndTheSouthSandwichIslands, Guatemala, Guam, GuineaBissau, Guyana, HongKong, HeardIslandAndMcDonaldIslands, Honduras, Croatia, Haiti, Hungary, Indonesia, Ireland, Israel, IsleOfMan, India, BritishIndianOceanTerritory, Iraq, Iran, Iceland, Italy, Jersey, Jamaica, Jordan, Japan, Kenya, Kyrgyzstan, Cambodia, Kiribati, Comoros, SaintKittsAndNevis, NorthKorea, SouthKorea, Kuwait, CaymanIslands, Kazakhstan, Laos, Lebanon, SaintLucia, Liechtenstein, SriLanka, Liberia, Lesotho, Lithuania, Luxembourg, Latvia, Libya, Morocco, Monaco, Moldova, Montenegro, SaintMartin, Madagascar, MarshallIslands, NorthMacedonia, Mali, Myanmar, Mongolia, Macau, NorthernMarianaIslands, Martinique, Mauritania, Montserrat, Malta, Mauritius, Maldives, Malawi, Mexico, Malaysia, Mozambique, Namibia, NewCaledonia, Niger, NorfolkIsland, Nigeria, Nicaragua, Netherlands, Norway, Nepal, Nauru, Niue, NewZealand, Oman, Panama, Peru, FrenchPolynesia, PapuaNewGuinea, Philippines, Pakistan, Poland, SaintPierreAndMiquelon, Pitcairn, PuertoRico, Palestine, Portugal, Palau, Paraguay, Qatar, Reunion, Romania, Serbia, Russia, Rwanda, SaudiArabia, SolomonIslands, Seychelles, Sudan, Sweden, Singapore, SaintHelena, Slovenia, SvalbardAndJanMayen, Slovakia, SierraLeone, SanMarino, Senegal, Somalia, Suriname, SouthSudan, SaoTomeAndPrincipe, ElSalvador, SintMaarten, Syria, Eswatini, TurksAndCaicosIslands, Chad, FrenchSouthernTerritories, Togo, Thailand, Tajikistan, Tokelau, TimorLeste, Turkmenistan, Tunisia, Tonga, Turkey, TrinidadAndTobago, Tuvalu, Taiwan, Tanzania, Ukraine, Uganda, UnitedStatesMinorOutlyingIslands, UnitedStates, Uruguay, Uzbekistan, VaticanCity, SaintVincentAndTheGrenadines, Venezuela, BritishVirginIslands, UnitedStatesVirginIslands, Vietnam, Vanuatu, WallisAndFutuna, Samoa, Kosovo, Yemen, Mayotte, SouthAfrica, Zambia, Zimbabwe, Unknown(Box<str>),
}
Expand description

A country or territory, identified by its ISO 3166-1 alpha-2 code.

Variants§

§

Andorra

Andorra (alpha-3 AND, numeric 020)

§

UnitedArabEmirates

United Arab Emirates (the) (alpha-3 ARE, numeric 784)

§

Afghanistan

Afghanistan (alpha-3 AFG, numeric 004)

§

AntiguaAndBarbuda

Antigua and Barbuda (alpha-3 ATG, numeric 028)

§

Anguilla

Anguilla (alpha-3 AIA, numeric 660)

§

Albania

Albania (alpha-3 ALB, numeric 008)

§

Armenia

Armenia (alpha-3 ARM, numeric 051)

§

Angola

Angola (alpha-3 AGO, numeric 024)

§

Antarctica

Antarctica (alpha-3 ATA, numeric 010)

§

Argentina

Argentina (alpha-3 ARG, numeric 032)

§

AmericanSamoa

American Samoa (alpha-3 ASM, numeric 016)

§

Austria

Austria (alpha-3 AUT, numeric 040)

§

Australia

Australia (alpha-3 AUS, numeric 036)

§

Aruba

Aruba (alpha-3 ABW, numeric 533)

§

AlandIslands

Åland Islands (alpha-3 ALA, numeric 248)

§

Azerbaijan

Azerbaijan (alpha-3 AZE, numeric 031)

§

BosniaAndHerzegovina

Bosnia and Herzegovina (alpha-3 BIH, numeric 070)

§

Barbados

Barbados (alpha-3 BRB, numeric 052)

§

Bangladesh

Bangladesh (alpha-3 BGD, numeric 050)

§

Belgium

Belgium (alpha-3 BEL, numeric 056)

§

BurkinaFaso

Burkina Faso (alpha-3 BFA, numeric 854)

§

Bulgaria

Bulgaria (alpha-3 BGR, numeric 100)

§

Bahrain

Bahrain (alpha-3 BHR, numeric 048)

§

Burundi

Burundi (alpha-3 BDI, numeric 108)

§

Benin

Benin (alpha-3 BEN, numeric 204)

§

SaintBarthelemy

Saint Barthélemy (alpha-3 BLM, numeric 652)

§

Bermuda

Bermuda (alpha-3 BMU, numeric 060)

§

Brunei

Brunei Darussalam (alpha-3 BRN, numeric 096)

§

Bolivia

Bolivia (Plurinational State of) (alpha-3 BOL, numeric 068)

§

BonaireSintEustatiusAndSaba

Bonaire, Sint Eustatius and Saba (alpha-3 BES, numeric 535)

§

Brazil

Brazil (alpha-3 BRA, numeric 076)

§

Bahamas

Bahamas (the) (alpha-3 BHS, numeric 044)

§

Bhutan

Bhutan (alpha-3 BTN, numeric 064)

§

BouvetIsland

Bouvet Island (alpha-3 BVT, numeric 074)

§

Botswana

Botswana (alpha-3 BWA, numeric 072)

§

Belarus

Belarus (alpha-3 BLR, numeric 112)

§

Belize

Belize (alpha-3 BLZ, numeric 084)

§

Canada

Canada (alpha-3 CAN, numeric 124)

§

CocosKeelingIslands

Cocos (Keeling) Islands (the) (alpha-3 CCK, numeric 166)

§

DemocraticRepublicOfTheCongo

Congo (the Democratic Republic of the) (alpha-3 COD, numeric 180)

§

CentralAfricanRepublic

Central African Republic (the) (alpha-3 CAF, numeric 140)

§

Congo

Congo (the) (alpha-3 COG, numeric 178)

§

Switzerland

Switzerland (alpha-3 CHE, numeric 756)

§

CoteDIvoire

Côte d’Ivoire (alpha-3 CIV, numeric 384)

§

CookIslands

Cook Islands (the) (alpha-3 COK, numeric 184)

§

Chile

Chile (alpha-3 CHL, numeric 152)

§

Cameroon

Cameroon (alpha-3 CMR, numeric 120)

§

China

China (alpha-3 CHN, numeric 156)

§

Colombia

Colombia (alpha-3 COL, numeric 170)

§

CostaRica

Costa Rica (alpha-3 CRI, numeric 188)

§

Cuba

Cuba (alpha-3 CUB, numeric 192)

§

CapeVerde

Cabo Verde (alpha-3 CPV, numeric 132)

§

Curacao

Curaçao (alpha-3 CUW, numeric 531)

§

ChristmasIsland

Christmas Island (alpha-3 CXR, numeric 162)

§

Cyprus

Cyprus (alpha-3 CYP, numeric 196)

§

CzechRepublic

Czechia (alpha-3 CZE, numeric 203)

§

Germany

Germany (alpha-3 DEU, numeric 276)

§

Djibouti

Djibouti (alpha-3 DJI, numeric 262)

§

Denmark

Denmark (alpha-3 DNK, numeric 208)

§

Dominica

Dominica (alpha-3 DMA, numeric 212)

§

DominicanRepublic

Dominican Republic (the) (alpha-3 DOM, numeric 214)

§

Algeria

Algeria (alpha-3 DZA, numeric 012)

§

Ecuador

Ecuador (alpha-3 ECU, numeric 218)

§

Estonia

Estonia (alpha-3 EST, numeric 233)

§

Egypt

Egypt (alpha-3 EGY, numeric 818)

§

WesternSahara

Western Sahara* (alpha-3 ESH, numeric 732) — contested

§

Eritrea

Eritrea (alpha-3 ERI, numeric 232)

§

Spain

Spain (alpha-3 ESP, numeric 724)

§

Ethiopia

Ethiopia (alpha-3 ETH, numeric 231)

§

EuropeanUnion

European Union (alpha-3 , numeric ) — exceptionally reserved (not a country); commonly seen in geolocation data; no official ISO 3166-1 alpha-3 or numeric code

§

Finland

Finland (alpha-3 FIN, numeric 246)

§

Fiji

Fiji (alpha-3 FJI, numeric 242)

§

FalklandIslands

Falkland Islands (the) [Malvinas] (alpha-3 FLK, numeric 238) — contested

§

Micronesia

Micronesia (Federated States of) (alpha-3 FSM, numeric 583)

§

FaroeIslands

Faroe Islands (the) (alpha-3 FRO, numeric 234)

§

France

France (alpha-3 FRA, numeric 250)

§

Gabon

Gabon (alpha-3 GAB, numeric 266)

§

UnitedKingdom

United Kingdom of Great Britain and Northern Ireland (the) (alpha-3 GBR, numeric 826)

§

Grenada

Grenada (alpha-3 GRD, numeric 308)

§

Georgia

Georgia (alpha-3 GEO, numeric 268)

§

FrenchGuiana

French Guiana (alpha-3 GUF, numeric 254)

§

Guernsey

Guernsey (alpha-3 GGY, numeric 831)

§

Ghana

Ghana (alpha-3 GHA, numeric 288)

§

Gibraltar

Gibraltar (alpha-3 GIB, numeric 292)

§

Greenland

Greenland (alpha-3 GRL, numeric 304)

§

Gambia

Gambia (the) (alpha-3 GMB, numeric 270)

§

Guinea

Guinea (alpha-3 GIN, numeric 324)

§

Guadeloupe

Guadeloupe (alpha-3 GLP, numeric 312)

§

EquatorialGuinea

Equatorial Guinea (alpha-3 GNQ, numeric 226)

§

Greece

Greece (alpha-3 GRC, numeric 300)

§

SouthGeorgiaAndTheSouthSandwichIslands

South Georgia and the South Sandwich Islands (alpha-3 SGS, numeric 239)

§

Guatemala

Guatemala (alpha-3 GTM, numeric 320)

§

Guam

Guam (alpha-3 GUM, numeric 316)

§

GuineaBissau

Guinea-Bissau (alpha-3 GNB, numeric 624)

§

Guyana

Guyana (alpha-3 GUY, numeric 328)

§

HongKong

Hong Kong (alpha-3 HKG, numeric 344)

§

HeardIslandAndMcDonaldIslands

Heard Island and McDonald Islands (alpha-3 HMD, numeric 334)

§

Honduras

Honduras (alpha-3 HND, numeric 340)

§

Croatia

Croatia (alpha-3 HRV, numeric 191)

§

Haiti

Haiti (alpha-3 HTI, numeric 332)

§

Hungary

Hungary (alpha-3 HUN, numeric 348)

§

Indonesia

Indonesia (alpha-3 IDN, numeric 360)

§

Ireland

Ireland (alpha-3 IRL, numeric 372)

§

Israel

Israel (alpha-3 ISR, numeric 376)

§

IsleOfMan

Isle of Man (alpha-3 IMN, numeric 833)

§

India

India (alpha-3 IND, numeric 356)

§

BritishIndianOceanTerritory

British Indian Ocean Territory (the) (alpha-3 IOT, numeric 086)

§

Iraq

Iraq (alpha-3 IRQ, numeric 368)

§

Iran

Iran (Islamic Republic of) (alpha-3 IRN, numeric 364)

§

Iceland

Iceland (alpha-3 ISL, numeric 352)

§

Italy

Italy (alpha-3 ITA, numeric 380)

§

Jersey

Jersey (alpha-3 JEY, numeric 832)

§

Jamaica

Jamaica (alpha-3 JAM, numeric 388)

§

Jordan

Jordan (alpha-3 JOR, numeric 400)

§

Japan

Japan (alpha-3 JPN, numeric 392)

§

Kenya

Kenya (alpha-3 KEN, numeric 404)

§

Kyrgyzstan

Kyrgyzstan (alpha-3 KGZ, numeric 417)

§

Cambodia

Cambodia (alpha-3 KHM, numeric 116)

§

Kiribati

Kiribati (alpha-3 KIR, numeric 296)

§

Comoros

Comoros (the) (alpha-3 COM, numeric 174)

§

SaintKittsAndNevis

Saint Kitts and Nevis (alpha-3 KNA, numeric 659)

§

NorthKorea

Korea (the Democratic People’s Republic of) (alpha-3 PRK, numeric 408)

§

SouthKorea

Korea (the Republic of) (alpha-3 KOR, numeric 410)

§

Kuwait

Kuwait (alpha-3 KWT, numeric 414)

§

CaymanIslands

Cayman Islands (the) (alpha-3 CYM, numeric 136)

§

Kazakhstan

Kazakhstan (alpha-3 KAZ, numeric 398)

§

Laos

Lao People’s Democratic Republic (the) (alpha-3 LAO, numeric 418)

§

Lebanon

Lebanon (alpha-3 LBN, numeric 422)

§

SaintLucia

Saint Lucia (alpha-3 LCA, numeric 662)

§

Liechtenstein

Liechtenstein (alpha-3 LIE, numeric 438)

§

SriLanka

Sri Lanka (alpha-3 LKA, numeric 144)

§

Liberia

Liberia (alpha-3 LBR, numeric 430)

§

Lesotho

Lesotho (alpha-3 LSO, numeric 426)

§

Lithuania

Lithuania (alpha-3 LTU, numeric 440)

§

Luxembourg

Luxembourg (alpha-3 LUX, numeric 442)

§

Latvia

Latvia (alpha-3 LVA, numeric 428)

§

Libya

Libya (alpha-3 LBY, numeric 434)

§

Morocco

Morocco (alpha-3 MAR, numeric 504)

§

Monaco

Monaco (alpha-3 MCO, numeric 492)

§

Moldova

Moldova (the Republic of) (alpha-3 MDA, numeric 498)

§

Montenegro

Montenegro (alpha-3 MNE, numeric 499)

§

SaintMartin

Saint Martin (French part) (alpha-3 MAF, numeric 663)

§

Madagascar

Madagascar (alpha-3 MDG, numeric 450)

§

MarshallIslands

Marshall Islands (the) (alpha-3 MHL, numeric 584)

§

NorthMacedonia

North Macedonia (alpha-3 MKD, numeric 807)

§

Mali

Mali (alpha-3 MLI, numeric 466)

§

Myanmar

Myanmar (alpha-3 MMR, numeric 104)

§

Mongolia

Mongolia (alpha-3 MNG, numeric 496)

§

Macau

Macao (alpha-3 MAC, numeric 446)

§

NorthernMarianaIslands

Northern Mariana Islands (the) (alpha-3 MNP, numeric 580)

§

Martinique

Martinique (alpha-3 MTQ, numeric 474)

§

Mauritania

Mauritania (alpha-3 MRT, numeric 478)

§

Montserrat

Montserrat (alpha-3 MSR, numeric 500)

§

Malta

Malta (alpha-3 MLT, numeric 470)

§

Mauritius

Mauritius (alpha-3 MUS, numeric 480)

§

Maldives

Maldives (alpha-3 MDV, numeric 462)

§

Malawi

Malawi (alpha-3 MWI, numeric 454)

§

Mexico

Mexico (alpha-3 MEX, numeric 484)

§

Malaysia

Malaysia (alpha-3 MYS, numeric 458)

§

Mozambique

Mozambique (alpha-3 MOZ, numeric 508)

§

Namibia

Namibia (alpha-3 NAM, numeric 516)

§

NewCaledonia

New Caledonia (alpha-3 NCL, numeric 540)

§

Niger

Niger (the) (alpha-3 NER, numeric 562)

§

NorfolkIsland

Norfolk Island (alpha-3 NFK, numeric 574)

§

Nigeria

Nigeria (alpha-3 NGA, numeric 566)

§

Nicaragua

Nicaragua (alpha-3 NIC, numeric 558)

§

Netherlands

Netherlands (the) (alpha-3 NLD, numeric 528)

§

Norway

Norway (alpha-3 NOR, numeric 578)

§

Nepal

Nepal (alpha-3 NPL, numeric 524)

§

Nauru

Nauru (alpha-3 NRU, numeric 520)

§

Niue

Niue (alpha-3 NIU, numeric 570)

§

NewZealand

New Zealand (alpha-3 NZL, numeric 554)

§

Oman

Oman (alpha-3 OMN, numeric 512)

§

Panama

Panama (alpha-3 PAN, numeric 591)

§

Peru

Peru (alpha-3 PER, numeric 604)

§

FrenchPolynesia

French Polynesia (alpha-3 PYF, numeric 258)

§

PapuaNewGuinea

Papua New Guinea (alpha-3 PNG, numeric 598)

§

Philippines

Philippines (the) (alpha-3 PHL, numeric 608)

§

Pakistan

Pakistan (alpha-3 PAK, numeric 586)

§

Poland

Poland (alpha-3 POL, numeric 616)

§

SaintPierreAndMiquelon

Saint Pierre and Miquelon (alpha-3 SPM, numeric 666)

§

Pitcairn

Pitcairn (alpha-3 PCN, numeric 612)

§

PuertoRico

Puerto Rico (alpha-3 PRI, numeric 630)

§

Palestine

Palestine, State of (alpha-3 PSE, numeric 275) — contested

§

Portugal

Portugal (alpha-3 PRT, numeric 620)

§

Palau

Palau (alpha-3 PLW, numeric 585)

§

Paraguay

Paraguay (alpha-3 PRY, numeric 600)

§

Qatar

Qatar (alpha-3 QAT, numeric 634)

§

Reunion

Reunion (alpha-3 REU, numeric 638)

§

Romania

Romania (alpha-3 ROU, numeric 642)

§

Serbia

Serbia (alpha-3 SRB, numeric 688)

§

Russia

Russian Federation (the) (alpha-3 RUS, numeric 643)

§

Rwanda

Rwanda (alpha-3 RWA, numeric 646)

§

SaudiArabia

Saudi Arabia (alpha-3 SAU, numeric 682)

§

SolomonIslands

Solomon Islands (alpha-3 SLB, numeric 090)

§

Seychelles

Seychelles (alpha-3 SYC, numeric 690)

§

Sudan

Sudan (the) (alpha-3 SDN, numeric 729)

§

Sweden

Sweden (alpha-3 SWE, numeric 752)

§

Singapore

Singapore (alpha-3 SGP, numeric 702)

§

SaintHelena

Saint Helena, Ascension and Tristan da Cunha (alpha-3 SHN, numeric 654)

§

Slovenia

Slovenia (alpha-3 SVN, numeric 705)

§

SvalbardAndJanMayen

Svalbard and Jan Mayen (alpha-3 SJM, numeric 744)

§

Slovakia

Slovakia (alpha-3 SVK, numeric 703)

§

SierraLeone

Sierra Leone (alpha-3 SLE, numeric 694)

§

SanMarino

San Marino (alpha-3 SMR, numeric 674)

§

Senegal

Senegal (alpha-3 SEN, numeric 686)

§

Somalia

Somalia (alpha-3 SOM, numeric 706)

§

Suriname

Suriname (alpha-3 SUR, numeric 740)

§

SouthSudan

South Sudan (alpha-3 SSD, numeric 728)

§

SaoTomeAndPrincipe

Sao Tome and Principe (alpha-3 STP, numeric 678)

§

ElSalvador

El Salvador (alpha-3 SLV, numeric 222)

§

SintMaarten

Sint Maarten (Dutch part) (alpha-3 SXM, numeric 534)

§

Syria

Syrian Arab Republic (the) (alpha-3 SYR, numeric 760)

§

Eswatini

Eswatini (alpha-3 SWZ, numeric 748)

§

TurksAndCaicosIslands

Turks and Caicos Islands (the) (alpha-3 TCA, numeric 796)

§

Chad

Chad (alpha-3 TCD, numeric 148)

§

FrenchSouthernTerritories

French Southern Territories (the) (alpha-3 ATF, numeric 260)

§

Togo

Togo (alpha-3 TGO, numeric 768)

§

Thailand

Thailand (alpha-3 THA, numeric 764)

§

Tajikistan

Tajikistan (alpha-3 TJK, numeric 762)

§

Tokelau

Tokelau (alpha-3 TKL, numeric 772)

§

TimorLeste

Timor-Leste (alpha-3 TLS, numeric 626)

§

Turkmenistan

Turkmenistan (alpha-3 TKM, numeric 795)

§

Tunisia

Tunisia (alpha-3 TUN, numeric 788)

§

Tonga

Tonga (alpha-3 TON, numeric 776)

§

Turkey

Türkiye (alpha-3 TUR, numeric 792)

§

TrinidadAndTobago

Trinidad and Tobago (alpha-3 TTO, numeric 780)

§

Tuvalu

Tuvalu (alpha-3 TUV, numeric 798)

§

Taiwan

Taiwan (Province of China) (alpha-3 TWN, numeric 158) — contested

§

Tanzania

Tanzania, the United Republic of (alpha-3 TZA, numeric 834)

§

Ukraine

Ukraine (alpha-3 UKR, numeric 804)

§

Uganda

Uganda (alpha-3 UGA, numeric 800)

§

UnitedStatesMinorOutlyingIslands

United States Minor Outlying Islands (the) (alpha-3 UMI, numeric 581)

§

UnitedStates

United States of America (the) (alpha-3 USA, numeric 840)

§

Uruguay

Uruguay (alpha-3 URY, numeric 858)

§

Uzbekistan

Uzbekistan (alpha-3 UZB, numeric 860)

§

VaticanCity

Holy See (the) (alpha-3 VAT, numeric 336)

§

SaintVincentAndTheGrenadines

Saint Vincent and the Grenadines (alpha-3 VCT, numeric 670)

§

Venezuela

Venezuela (Bolivarian Republic of) (alpha-3 VEN, numeric 862)

§

BritishVirginIslands

Virgin Islands (British) (alpha-3 VGB, numeric 092)

§

UnitedStatesVirginIslands

Virgin Islands (U.S.) (alpha-3 VIR, numeric 850)

§

Vietnam

Viet Nam (alpha-3 VNM, numeric 704)

§

Vanuatu

Vanuatu (alpha-3 VUT, numeric 548)

§

WallisAndFutuna

Wallis and Futuna (alpha-3 WLF, numeric 876)

§

Samoa

Samoa (alpha-3 WSM, numeric 882)

§

Kosovo

Kosovo (alpha-3 XKX, numeric 983) — user-assigned (not officially in ISO 3166-1); XKX/983 are common de-facto conventions used by EU/IMF/geolocation data; contested

§

Yemen

Yemen (alpha-3 YEM, numeric 887)

§

Mayotte

Mayotte (alpha-3 MYT, numeric 175)

§

SouthAfrica

South Africa (alpha-3 ZAF, numeric 710)

§

Zambia

Zambia (alpha-3 ZMB, numeric 894)

§

Zimbabwe

Zimbabwe (alpha-3 ZWE, numeric 716)

§

Unknown(Box<str>)

A code not recognised by this version of rama, preserved verbatim.

Implementations§

§

impl Country

pub fn is_in_eu(&self) -> bool

Whether this country is a current member state of the European Union (the 27 members as of 2020, post-Brexit).

This is derived from the country identity rather than read from any database, so it reflects rama’s maintained view of EU membership.

pub fn from_alpha3(code: &str) -> Option<Country>

Look up a country by its ISO 3166-1 alpha-3 code (case-sensitive), e.g. "BEL". Returns None for an unrecognised code.

pub fn from_numeric(numeric: u16) -> Option<Country>

Look up a country by its ISO 3166-1 numeric code, e.g. 56 (Belgium). Returns None for an unrecognised code.

§

impl Country

pub const ALL: &'static [Country]

Every known value, in canonical-code order (excludes Unknown).

pub fn code(&self) -> &str

The canonical code for this value (e.g. "BE").

pub fn name(&self) -> Option<&'static str>

The English display name, or None for an unknown code.

pub fn from_code(code: &str) -> Country

Parse from a canonical code (case-sensitive). Unknown codes are preserved in the Unknown variant rather than rejected.

pub fn is_known(&self) -> bool

Whether this is a known (non-Unknown) value.

pub fn as_view(&self) -> CountryRef<'_>

Borrow as the Copy reference form.

§

impl Country

pub fn alpha3(&self) -> Option<&'static str>

The alpha3 metadata for this value, or None if unknown.

pub fn numeric(&self) -> Option<u16>

The numeric metadata for this value, or None if unknown.

Trait Implementations§

§

impl Clone for Country

§

fn clone(&self) -> Country

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
§

impl Debug for Country

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Country

§

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

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

impl Display for Country

§

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

Formats the value using the given formatter. Read more
§

impl Eq for Country

§

impl From<&str> for Country

§

fn from(s: &str) -> Country

Converts to this type from the input type.
§

impl From<String> for Country

§

fn from(s: String) -> Country

Converts to this type from the input type.
§

impl FromStr for Country

§

type Err = Infallible

The associated error which can be returned from parsing.
§

fn from_str(s: &str) -> Result<Country, <Country as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl Hash for Country

§

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

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

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

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

impl PartialEq for Country

§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

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

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

impl Serialize for Country

§

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

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

impl StructuralPartialEq for Country

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

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

Source§

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

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

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

§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> FutureExt for T

§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> IntoRequest<T> for T

§

fn into_request(self) -> Request<T>

Wrap the input message T in a rama_grpc::Request
§

impl<L> LayerExt<L> for L

§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

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

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
§

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

§

fn rama_from(value: T) -> U

§

impl<T, U, CrateMarker> RamaInto<U, CrateMarker> for T
where U: RamaFrom<T, CrateMarker>,

§

fn rama_into(self) -> U

§

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

§

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

§

fn rama_try_from(value: T) -> Result<U, <U as RamaTryFrom<T>>::Error>

§

impl<T, U, CrateMarker> RamaTryInto<U, CrateMarker> for T
where U: RamaTryFrom<T, CrateMarker>,

§

type Error = <U as RamaTryFrom<T, CrateMarker>>::Error

§

fn rama_try_into(self) -> Result<U, <U as RamaTryFrom<T, CrateMarker>>::Error>

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

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

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

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

§

fn to_smolstr(&self) -> SmolStr

Source§

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

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<T> ToStringFallible for T
where T: Display,

§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

Source§

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

Source§

type Error = Infallible

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

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

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<V, F> ValueFormatter<&V> for F
where F: ValueFormatter<V> + ?Sized, V: ?Sized,

§

fn format_value(writer: impl ValueWriter, value: &&V)

Write value to writer
§

impl<V, F> ValueFormatter<Arc<V>> for F
where F: ValueFormatter<V> + ?Sized, V: ?Sized,

§

fn format_value(writer: impl ValueWriter, value: &Arc<V>)

Write value to writer
§

impl<V, F> ValueFormatter<Box<V>> for F
where F: ValueFormatter<V> + ?Sized, V: ?Sized,

§

fn format_value(writer: impl ValueWriter, value: &Box<V>)

Write value to writer
§

impl<V, F> ValueFormatter<Cow<'_, V>> for F
where V: ToOwned + ?Sized, F: ValueFormatter<V> + ?Sized,

§

fn format_value(writer: impl ValueWriter, value: &Cow<'_, V>)

Write value to writer
§

impl<V, F> ValueFormatter<Option<V>> for F
where F: ValueFormatter<V> + ?Sized,

§

fn format_value(writer: impl ValueWriter, value: &Option<V>)

Write value to writer
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more