Enum google_maps::Country

source ·
#[non_exhaustive]
#[repr(u16)]
pub enum Country {
Show 249 variants Afghanistan = 0, AlandIslands = 1, Albania = 2, Algeria = 3, AmericanSamoa = 4, Andorra = 5, Angola = 6, Anguilla = 7, Antarctica = 8, AntiguaAndBarbuda = 9, Argentina = 10, Armenia = 11, Aruba = 12, Australia = 13, Austria = 14, Azerbaijan = 15, Bahamas = 16, Bahrain = 17, Bangladesh = 18, Barbados = 19, Belarus = 20, Belgium = 21, Belize = 22, Benin = 23, Bermuda = 24, Bhutan = 25, Bolivia = 26, BonaireSintEustatiusAndSaba = 27, BosniaAndHerzegovina = 28, Botswana = 29, BouvetIsland = 30, Brazil = 31, BritishIndianOceanTerritory = 32, BritishVirginIslands = 33, Brunei = 34, Bulgaria = 35, BurkinaFaso = 36, Burundi = 37, CaboVerde = 38, Cambodia = 39, Cameroon = 40, Canada = 41, CaymanIslands = 42, CentralAfricanRepublic = 43, Chad = 44, Chile = 45, China = 46, ChristmasIsland = 47, CocosKeelingIslands = 48, Colombia = 49, Comoros = 50, CongoBrazzaville = 51, CongoKinshasa = 52, CookIslands = 53, CostaRica = 54, CotedIvoire = 55, Croatia = 56, Cuba = 57, Curacao = 58, Cyprus = 59, Czechia = 60, Denmark = 61, Djibouti = 62, Dominica = 63, DominicanRepublic = 64, Ecuador = 65, Egypt = 66, ElSalvador = 67, EquatorialGuinea = 68, Eritrea = 69, Estonia = 70, Eswatini = 71, Ethiopia = 72, FalklandIslands = 73, FaroeIslands = 74, Fiji = 75, Finland = 76, France = 77, FrenchGuiana = 78, FrenchPolynesia = 79, FrenchSouthernTerritories = 80, Gabon = 81, Gambia = 82, Georgia = 83, Germany = 84, Ghana = 85, Gibraltar = 86, Greece = 87, Greenland = 88, Grenada = 89, Guadeloupe = 90, Guam = 91, Guatemala = 92, Guernsey = 93, Guinea = 94, GuineaBissau = 95, Guyana = 96, Haiti = 97, HeardAndMcDonaldIslands = 98, HolySee = 99, Honduras = 100, HongKong = 101, Hungary = 102, Iceland = 103, India = 104, Indonesia = 105, Iran = 106, Iraq = 107, Ireland = 108, IsleOfMan = 109, Israel = 110, Italy = 111, Jamaica = 112, Japan = 113, Jersey = 114, Jordan = 115, Kazakhstan = 116, Kenya = 117, Kiribati = 118, Kuwait = 119, Kyrgyzstan = 120, Laos = 121, Latvia = 122, Lebanon = 123, Lesotho = 124, Liberia = 125, Libya = 126, Liechtenstein = 127, Lithuania = 128, Luxembourg = 129, Macao = 130, Madagascar = 131, Malawi = 132, Malaysia = 133, Maldives = 134, Mali = 135, Malta = 136, MarshallIslands = 137, Martinique = 138, Mauritania = 139, Mauritius = 140, Mayotte = 141, Mexico = 142, Micronesia = 143, Moldova = 144, Monaco = 145, Mongolia = 146, Montenegro = 147, Montserrat = 148, Morocco = 149, Mozambique = 150, Myanmar = 151, Namibia = 152, Nauru = 153, Nepal = 154, Netherlands = 155, NewCaledonia = 156, NewZealand = 157, Nicaragua = 158, Niger = 159, Nigeria = 160, Niue = 161, NorfolkIsland = 162, NorthernMarianaIslands = 163, NorthKorea = 164, NorthMacedonia = 165, Norway = 166, Oman = 167, Pakistan = 168, Palau = 169, Palestine = 170, Panama = 171, PapuaNewGuinea = 172, Paraguay = 173, Peru = 174, Philippines = 175, Pitcairn = 176, Poland = 177, Portugal = 178, PuertoRico = 179, Qatar = 180, Reunion = 181, Romania = 182, Russia = 183, Rwanda = 184, Samoa = 185, SanMarino = 186, SaoTomeAndPrincipe = 187, SaudiArabia = 188, Senegal = 189, Serbia = 190, Seychelles = 191, SierraLeone = 192, Singapore = 193, SintMaarten = 194, Slovakia = 195, Slovenia = 196, SolomonIslands = 197, Somalia = 198, SouthAfrica = 199, SouthGeorgiaAndSouthSandwichIslands = 200, SouthKorea = 201, SouthSudan = 202, Spain = 203, SriLanka = 204, StBarthelemy = 205, StHelena = 206, StKittsAndNevis = 207, StLucia = 208, StMartin = 209, StPierreAndMiquelon = 210, StVincentAndGrenadines = 211, Sudan = 212, Suriname = 213, SvalbardAndJanMayen = 214, Sweden = 215, Switzerland = 216, Syria = 217, Taiwan = 218, Tajikistan = 219, Tanzania = 220, Thailand = 221, TimorLeste = 222, Togo = 223, Tokelau = 224, Tonga = 225, TrinidadAndTobago = 226, Tunisia = 227, Turkey = 228, Turkmenistan = 229, TurksAndCaicosIslands = 230, Tuvalu = 231, Uganda = 232, Ukraine = 233, UnitedArabEmirates = 234, UnitedKingdom = 235, UnitedStates = 236, UnitedStatesMinorOutlyingIslands = 237, Uruguay = 238, USVirginIslands = 239, Uzbekistan = 240, Vanuatu = 241, Venezuela = 242, Vietnam = 243, WallisAndFutuna = 244, WesternSahara = 245, Yemen = 246, Zambia = 247, Zimbabwe = 248,
}
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 (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Afghanistan = 0

§

AlandIslands = 1

§

Albania = 2

§

Algeria = 3

§

AmericanSamoa = 4

§

Andorra = 5

§

Angola = 6

§

Anguilla = 7

§

Antarctica = 8

§

AntiguaAndBarbuda = 9

§

Argentina = 10

§

Armenia = 11

§

Aruba = 12

§

Australia = 13

§

Austria = 14

§

Azerbaijan = 15

§

Bahamas = 16

§

Bahrain = 17

§

Bangladesh = 18

§

Barbados = 19

§

Belarus = 20

§

Belgium = 21

§

Belize = 22

§

Benin = 23

§

Bermuda = 24

§

Bhutan = 25

§

Bolivia = 26

§

BonaireSintEustatiusAndSaba = 27

§

BosniaAndHerzegovina = 28

§

Botswana = 29

§

BouvetIsland = 30

§

Brazil = 31

§

BritishIndianOceanTerritory = 32

§

BritishVirginIslands = 33

§

Brunei = 34

§

Bulgaria = 35

§

BurkinaFaso = 36

§

Burundi = 37

§

CaboVerde = 38

§

Cambodia = 39

§

Cameroon = 40

§

Canada = 41

§

CaymanIslands = 42

§

CentralAfricanRepublic = 43

§

Chad = 44

§

Chile = 45

§

China = 46

§

ChristmasIsland = 47

§

CocosKeelingIslands = 48

§

Colombia = 49

§

Comoros = 50

§

CongoBrazzaville = 51

§

CongoKinshasa = 52

§

CookIslands = 53

§

CostaRica = 54

§

CotedIvoire = 55

§

Croatia = 56

§

Cuba = 57

§

Curacao = 58

§

Cyprus = 59

§

Czechia = 60

§

Denmark = 61

§

Djibouti = 62

§

Dominica = 63

§

DominicanRepublic = 64

§

Ecuador = 65

§

Egypt = 66

§

ElSalvador = 67

§

EquatorialGuinea = 68

§

Eritrea = 69

§

Estonia = 70

§

Eswatini = 71

§

Ethiopia = 72

§

FalklandIslands = 73

§

FaroeIslands = 74

§

Fiji = 75

§

Finland = 76

§

France = 77

§

FrenchGuiana = 78

§

FrenchPolynesia = 79

§

FrenchSouthernTerritories = 80

§

Gabon = 81

§

Gambia = 82

§

Georgia = 83

§

Germany = 84

§

Ghana = 85

§

Gibraltar = 86

§

Greece = 87

§

Greenland = 88

§

Grenada = 89

§

Guadeloupe = 90

§

Guam = 91

§

Guatemala = 92

§

Guernsey = 93

§

Guinea = 94

§

GuineaBissau = 95

§

Guyana = 96

§

Haiti = 97

§

HeardAndMcDonaldIslands = 98

§

HolySee = 99

§

Honduras = 100

§

HongKong = 101

§

Hungary = 102

§

Iceland = 103

§

India = 104

§

Indonesia = 105

§

Iran = 106

§

Iraq = 107

§

Ireland = 108

§

IsleOfMan = 109

§

Israel = 110

§

Italy = 111

§

Jamaica = 112

§

Japan = 113

§

Jersey = 114

§

Jordan = 115

§

Kazakhstan = 116

§

Kenya = 117

§

Kiribati = 118

§

Kuwait = 119

§

Kyrgyzstan = 120

§

Laos = 121

§

Latvia = 122

§

Lebanon = 123

§

Lesotho = 124

§

Liberia = 125

§

Libya = 126

§

Liechtenstein = 127

§

Lithuania = 128

§

Luxembourg = 129

§

Macao = 130

§

Madagascar = 131

§

Malawi = 132

§

Malaysia = 133

§

Maldives = 134

§

Mali = 135

§

Malta = 136

§

MarshallIslands = 137

§

Martinique = 138

§

Mauritania = 139

§

Mauritius = 140

§

Mayotte = 141

§

Mexico = 142

§

Micronesia = 143

§

Moldova = 144

§

Monaco = 145

§

Mongolia = 146

§

Montenegro = 147

§

Montserrat = 148

§

Morocco = 149

§

Mozambique = 150

§

Myanmar = 151

§

Namibia = 152

§

Nauru = 153

§

Nepal = 154

§

Netherlands = 155

§

NewCaledonia = 156

§

NewZealand = 157

§

Nicaragua = 158

§

Niger = 159

§

Nigeria = 160

§

Niue = 161

§

NorfolkIsland = 162

§

NorthernMarianaIslands = 163

§

NorthKorea = 164

§

NorthMacedonia = 165

§

Norway = 166

§

Oman = 167

§

Pakistan = 168

§

Palau = 169

§

Palestine = 170

§

Panama = 171

§

PapuaNewGuinea = 172

§

Paraguay = 173

§

Peru = 174

§

Philippines = 175

§

Pitcairn = 176

§

Poland = 177

§

Portugal = 178

§

PuertoRico = 179

§

Qatar = 180

§

Reunion = 181

§

Romania = 182

§

Russia = 183

§

Rwanda = 184

§

Samoa = 185

§

SanMarino = 186

§

SaoTomeAndPrincipe = 187

§

SaudiArabia = 188

§

Senegal = 189

§

Serbia = 190

§

Seychelles = 191

§

SierraLeone = 192

§

Singapore = 193

§

SintMaarten = 194

§

Slovakia = 195

§

Slovenia = 196

§

SolomonIslands = 197

§

Somalia = 198

§

SouthAfrica = 199

§

SouthGeorgiaAndSouthSandwichIslands = 200

§

SouthKorea = 201

§

SouthSudan = 202

§

Spain = 203

§

SriLanka = 204

§

StBarthelemy = 205

§

StHelena = 206

§

StKittsAndNevis = 207

§

StLucia = 208

§

StMartin = 209

§

StPierreAndMiquelon = 210

§

StVincentAndGrenadines = 211

§

Sudan = 212

§

Suriname = 213

§

SvalbardAndJanMayen = 214

§

Sweden = 215

§

Switzerland = 216

§

Syria = 217

§

Taiwan = 218

§

Tajikistan = 219

§

Tanzania = 220

§

Thailand = 221

§

TimorLeste = 222

§

Togo = 223

§

Tokelau = 224

§

Tonga = 225

§

TrinidadAndTobago = 226

§

Tunisia = 227

§

Turkey = 228

§

Turkmenistan = 229

§

TurksAndCaicosIslands = 230

§

Tuvalu = 231

§

Uganda = 232

§

Ukraine = 233

§

UnitedArabEmirates = 234

§

UnitedKingdom = 235

§

UnitedStates = 236

§

UnitedStatesMinorOutlyingIslands = 237

§

Uruguay = 238

§

USVirginIslands = 239

§

Uzbekistan = 240

§

Vanuatu = 241

§

Venezuela = 242

§

Vietnam = 243

§

WallisAndFutuna = 244

§

WesternSahara = 245

§

Yemen = 246

§

Zambia = 247

§

Zimbabwe = 248

Implementations§

source§

impl Country

source

pub const fn display(&self) -> &str

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

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 Default for Country

source§

fn default() -> Country

Returns the “default value” for a type. 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

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

source§

impl From<&Country> for &str

source§

fn from(country: &Country) -> Self

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

source§

impl From<&Country> for String

source§

fn from(country: &Country) -> Self

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) -> Self
where Self: Sized,

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

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

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

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

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

impl PartialEq 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 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,

Manual implementation of Serialize for serde.

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 Copy for Country

source§

impl Eq for Country

source§

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

impl<T> From<T> for T

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 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> ToOwned for T
where 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 T
where 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 T
where U: Into<T>,

§

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>,

§

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

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

source§

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 T
where T: for<'de> Deserialize<'de>,