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

Country is the national political entity and is typically the highest order type returned by the Geocoder.

The codes match a country name or a two letter ISO 3166-1 country code. The API follows the ISO standard for defining countries, and the filtering works best when using the corresponding ISO code of the country.

Note: If you receive unexpected results with a country code, verify that you are using a code which includes the countries, dependent territories, and special areas of geographical interest you intend. You can find code information at Wikipedia: List of ISO 3166 country codes or the ISO Online Browsing Platform.

Variants§

§

Afghanistan

§

AlandIslands

§

Albania

§

Algeria

§

AmericanSamoa

§

Andorra

§

Angola

§

Anguilla

§

Antarctica

§

AntiguaAndBarbuda

§

Argentina

§

Armenia

§

Aruba

§

Australia

§

Austria

§

Azerbaijan

§

Bahamas

§

Bahrain

§

Bangladesh

§

Barbados

§

Belarus

§

Belgium

§

Belize

§

Benin

§

Bermuda

§

Bhutan

§

Bolivia

§

BonaireSintEustatiusAndSaba

§

BosniaAndHerzegovina

§

Botswana

§

BouvetIsland

§

Brazil

§

BritishIndianOceanTerritory

§

BritishVirginIslands

§

Brunei

§

Bulgaria

§

BurkinaFaso

§

Burundi

§

CaboVerde

§

Cambodia

§

Cameroon

§

Canada

§

CaymanIslands

§

CentralAfricanRepublic

§

Chad

§

Chile

§

China

§

ChristmasIsland

§

CocosKeelingIslands

§

Colombia

§

Comoros

§

CongoBrazzaville

§

CongoKinshasa

§

CookIslands

§

CostaRica

§

CotedIvoire

§

Croatia

§

Cuba

§

Curacao

§

Cyprus

§

Czechia

§

Denmark

§

Djibouti

§

Dominica

§

DominicanRepublic

§

Ecuador

§

Egypt

§

ElSalvador

§

EquatorialGuinea

§

Eritrea

§

Estonia

§

Eswatini

§

Ethiopia

§

FalklandIslands

§

FaroeIslands

§

Fiji

§

Finland

§

France

§

FrenchGuiana

§

FrenchPolynesia

§

FrenchSouthernTerritories

§

Gabon

§

Gambia

§

Georgia

§

Germany

§

Ghana

§

Gibraltar

§

Greece

§

Greenland

§

Grenada

§

Guadeloupe

§

Guam

§

Guatemala

§

Guernsey

§

Guinea

§

GuineaBissau

§

Guyana

§

Haiti

§

HeardAndMcDonaldIslands

§

HolySee

§

Honduras

§

HongKong

§

Hungary

§

Iceland

§

India

§

Indonesia

§

Iran

§

Iraq

§

Ireland

§

IsleOfMan

§

Israel

§

Italy

§

Jamaica

§

Japan

§

Jersey

§

Jordan

§

Kazakhstan

§

Kenya

§

Kiribati

§

Kuwait

§

Kyrgyzstan

§

Laos

§

Latvia

§

Lebanon

§

Lesotho

§

Liberia

§

Libya

§

Liechtenstein

§

Lithuania

§

Luxembourg

§

Macao

§

Madagascar

§

Malawi

§

Malaysia

§

Maldives

§

Mali

§

Malta

§

MarshallIslands

§

Martinique

§

Mauritania

§

Mauritius

§

Mayotte

§

Mexico

§

Micronesia

§

Moldova

§

Monaco

§

Mongolia

§

Montenegro

§

Montserrat

§

Morocco

§

Mozambique

§

Myanmar

§

Namibia

§

Nauru

§

Nepal

§

Netherlands

§

NewCaledonia

§

NewZealand

§

Nicaragua

§

Niger

§

Nigeria

§

Niue

§

NorfolkIsland

§

NorthernMarianaIslands

§

NorthKorea

§

NorthMacedonia

§

Norway

§

Oman

§

Pakistan

§

Palau

§

Palestine

§

Panama

§

PapuaNewGuinea

§

Paraguay

§

Peru

§

Philippines

§

Pitcairn

§

Poland

§

Portugal

§

PuertoRico

§

Qatar

§

Reunion

§

Romania

§

Russia

§

Rwanda

§

Samoa

§

SanMarino

§

SaoTomeAndPrincipe

§

SaudiArabia

§

Senegal

§

Serbia

§

Seychelles

§

SierraLeone

§

Singapore

§

SintMaarten

§

Slovakia

§

Slovenia

§

SolomonIslands

§

Somalia

§

SouthAfrica

§

SouthGeorgiaAndSouthSandwichIslands

§

SouthKorea

§

SouthSudan

§

Spain

§

SriLanka

§

StBarthelemy

§

StHelena

§

StKittsAndNevis

§

StLucia

§

StMartin

§

StPierreAndMiquelon

§

StVincentAndGrenadines

§

Sudan

§

Suriname

§

SvalbardAndJanMayen

§

Sweden

§

Switzerland

§

Syria

§

Taiwan

§

Tajikistan

§

Tanzania

§

Thailand

§

TimorLeste

§

Togo

§

Tokelau

§

Tonga

§

TrinidadAndTobago

§

Tunisia

§

Turkey

§

Turkmenistan

§

TurksAndCaicosIslands

§

Tuvalu

§

Uganda

§

Ukraine

§

UnitedArabEmirates

§

UnitedKingdom

§

UnitedStates

§

UnitedStatesMinorOutlyingIslands

§

Uruguay

§

USVirginIslands

§

Uzbekistan

§

Vanuatu

§

Venezuela

§

Vietnam

§

WallisAndFutuna

§

WesternSahara

§

Yemen

§

Zambia

§

Zimbabwe

Trait Implementations§

source§

impl Clone for Country

source§

fn clone(&self) -> Country

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for Country

source§

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

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

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

source§

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

Manual implementation of Deserialize for serde. This will take advantage of the phf-powered TryFrom implementation for this type.

source§

impl Display for Country

source§

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

Formats a Country enum into a string that is presentable to the end user.

source§

impl From<&Country> for String

source§

fn from(country: &Country) -> String

Converts a Country enum to a String that contains a ISO 3166-1 Alpha-2 country code.

source§

impl FromStr for Country

source§

fn from_str(country_code: &str) -> Result<Self, Self::Err>

Gets a Country enum from a String that contains a valid ISO 3166-1 Alpha-2 country code.

§

type Err = Error

The associated error which can be returned from parsing.
source§

impl Hash for Country

source§

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

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

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

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

impl Ord for Country

source§

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

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

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

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

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

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

fn clamp(self, min: Self, max: Self) -> Selfwhere Self: Sized + PartialOrd<Self>,

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

impl PartialEq<Country> for Country

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

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

impl PartialOrd<Country> for Country

source§

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

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

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

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

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Serialize for Country

source§

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

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

impl TryFrom<&str> for Country

source§

fn try_from(country_code: &str) -> Result<Self, Self::Error>

Gets a Country enum from a String that contains a valid ISO 3166-1 Alpha-2 country code.

§

type Error = Error

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

impl Eq for Country

source§

impl StructuralEq for Country

source§

impl StructuralPartialEq for Country

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

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

source§

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

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

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

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

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

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 Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

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

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

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

source§

default fn to_string(&self) -> String

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

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

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
§

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

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

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
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

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

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