pub enum PlaceType {
Show 142 variants Accounting, Airport, AmusementPark, Aquarium, ArtGallery, Atm, Bakery, Bank, Bar, BeautySalon, BicycleStore, BookStore, BowlingAlley, BusStation, Cafe, Campground, CarDealer, CarRental, CarRepair, CarWash, Casino, Cemetery, Church, CityHall, ClothingStore, ConvenienceStore, Courthouse, Dentist, DepartmentStore, Doctor, DrugStore, Electrician, ElectronicsStore, Embassy, FireStation, Florist, FuneralHome, FurnitureStore, GasStation, GroceryOrSupermarket, Gym, HairCare, HardwareStore, HinduTemple, HomeGoodsStore, Hospital, InsuranceAgency, JewelryStore, Laundry, Lawyer, Library, LightRailStation, LiquorStore, LocalGovernmentOffice, Locksmith, Lodging, MealDelivery, MealTakeaway, Mosque, MovieRental, MovieTheater, MovingCompany, Museum, NightClub, Painter, Park, Parking, PetStore, Pharmacy, Physiotherapist, Plumber, PlusCode, Police, PostOffice, PrimarySchool, RealEstateAgency, Restaurant, RoofingContractor, RvPark, School, SecondarySchool, ShoeStore, ShoppingMall, Spa, Stadium, Storage, Store, SubwayStation, Supermarket, Synagogue, TaxiStand, TouristAttraction, TrainStation, TransitStation, TravelAgency, University, VeterinaryCare, Zoo, AdministrativeAreaLevel1, AdministrativeAreaLevel2, AdministrativeAreaLevel3, AdministrativeAreaLevel4, AdministrativeAreaLevel5, Archipelago, ColloquialArea, Continent, Country, Establishment, Finance, Floor, Food, GeneralContractor, Geocode, Health, Intersection, Locality, NaturalFeature, Neighborhood, PlaceOfWorship, PointOfInterest, Political, PostBox, PostalCode, PostalCodePrefix, PostalCodeSuffix, PostalTown, Premise, Room, Route, StreetAddress, StreetNumber, Sublocality, SublocalityLevel1, SublocalityLevel2, SublocalityLevel3, SublocalityLevel4, SublocalityLevel5, Subpremise, TownSquare, Address, Regions, Cities,
}
Expand description

This specifies the types or categories of a place. For example, a returned location could be a “country” (as in a nation) or it could be a “shopping mall.” Also, a requested place could be a “locality” (a city) or a “street_address” This type helps define the data that is being returned or sought. See Place Types for more information.

Variants§

§

Accounting

§

Airport

Indicates an airport.

§

AmusementPark

§

Aquarium

§

ArtGallery

§

Atm

§

Bakery

§

Bank

§

Bar

§

BeautySalon

§

BicycleStore

§

BookStore

§

BowlingAlley

§

BusStation

§

Cafe

§

Campground

§

CarDealer

§

CarRental

§

CarRepair

§

CarWash

§

Casino

§

Cemetery

§

Church

§

CityHall

§

ClothingStore

§

ConvenienceStore

§

Courthouse

§

Dentist

§

DepartmentStore

§

Doctor

§

DrugStore

§

Electrician

§

ElectronicsStore

§

Embassy

§

FireStation

§

Florist

§

FuneralHome

§

FurnitureStore

§

GasStation

§

GroceryOrSupermarket

§

Gym

§

HairCare

§

HardwareStore

§

HinduTemple

§

HomeGoodsStore

§

Hospital

§

InsuranceAgency

§

JewelryStore

§

Laundry

§

Lawyer

§

Library

§

LightRailStation

§

LiquorStore

§

LocalGovernmentOffice

§

Locksmith

§

Lodging

§

MealDelivery

§

MealTakeaway

§

Mosque

§

MovieRental

§

MovieTheater

§

MovingCompany

§

Museum

§

NightClub

§

Painter

§

Park

Indicates a named park.

§

Parking

§

PetStore

§

Pharmacy

§

Physiotherapist

§

Plumber

§

PlusCode

§

Police

§

PostOffice

§

PrimarySchool

§

RealEstateAgency

§

Restaurant

§

RoofingContractor

§

RvPark

§

School

§

SecondarySchool

§

ShoeStore

§

ShoppingMall

§

Spa

§

Stadium

§

Storage

§

Store

§

SubwayStation

§

Supermarket

§

Synagogue

§

TaxiStand

§

TouristAttraction

§

TrainStation

§

TransitStation

§

TravelAgency

§

University

§

VeterinaryCare

§

Zoo

§

AdministrativeAreaLevel1

Indicates a first-order civil entity below the country level. Within the United States, these administrative levels are states. Not all nations exhibit these administrative levels. In most cases, AdministrativeAreaLevel1 short names will closely match ISO 3166-2 subdivisions and other widely circulated lists; however this is not guaranteed as our geocoding results are based on a variety of signals and location data.

§

AdministrativeAreaLevel2

Indicates a second-order civil entity below the country level. Within the United States, these administrative levels are counties. Not all nations exhibit these administrative levels.

§

AdministrativeAreaLevel3

Indicates a third-order civil entity below the country level. This type indicates a minor civil division. Not all nations exhibit these administrative levels.

§

AdministrativeAreaLevel4

Indicates a fourth-order civil entity below the country level. This type indicates a minor civil division. Not all nations exhibit these administrative levels.

§

AdministrativeAreaLevel5

Indicates a fifth-order civil entity below the country level. This type indicates a minor civil division. Not all nations exhibit these administrative levels.

§

Archipelago

§

ColloquialArea

Indicates a commonly-used alternative name for the entity.

§

Continent

§

Country

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

§

Establishment

§

Finance

§

Floor

§

Food

§

GeneralContractor

§

Geocode

§

Health

§

Intersection

Indicates a major intersection, usually of two major roads.

§

Locality

Indicates an incorporated city or town political entity.

§

NaturalFeature

Indicates a prominent natural feature.

§

Neighborhood

Indicates a named neighborhood.

§

PlaceOfWorship

§

PointOfInterest

Indicates a named point of interest. Typically, these “POI“s are prominent local entities that don’t easily fit in another category, such as “Empire State Building” or “Eiffel Tower”.

§

Political

Indicates a political entity. Usually, this type indicates a polygon of some civil administration.

§

PostBox

§

PostalCode

Indicates a postal code as used to address postal mail within the country.

§

PostalCodePrefix

§

PostalCodeSuffix

§

PostalTown

§

Premise

Indicates a named location, usually a building or collection of buildings with a common name.

§

Room

§

Route

Indicates a named route (such as “US 101”).

§

StreetAddress

Indicates a precise street address.

§

StreetNumber

§

Sublocality

Indicates a first-order civil entity below a locality. For some locations may receive one of the additional types: SublocalityLevel1 to SublocalityLevel5. Each sublocality level is a civil entity. Larger numbers indicate a smaller geographic area.

§

SublocalityLevel1

§

SublocalityLevel2

§

SublocalityLevel3

§

SublocalityLevel4

§

SublocalityLevel5

§

Subpremise

Indicates a first-order entity below a named location, usually a singular building within a collection of buildings with a common name.

§

TownSquare

§

Address

§

Regions

§

Cities

Implementations§

source§

impl PlaceType

source

pub fn vec_to_csv(place_types: &[PlaceType]) -> String

A helper function that converts a Vec<PlaceType> (i.e. an array of PlaceType enum) to a String that contains a comma-delimited list of place types codes.

Trait Implementations§

source§

impl Clone for PlaceType

source§

fn clone(&self) -> PlaceType

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 PlaceType

source§

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

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

impl Default for PlaceType

source§

fn default() -> Self

Returns a reasonable default variant for the PlaceType enum type.

source§

impl<'de> Deserialize<'de> for PlaceType

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 PlaceType

source§

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

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

source§

impl From<&PlaceType> for String

source§

fn from(place_type: &PlaceType) -> String

Converts a PlaceType enum to a String that contains a place type code.

source§

impl FromStr for PlaceType

source§

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

Gets a PlaceType enum from a String that contains a supported place type code.

§

type Err = Error

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

impl Hash for PlaceType

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 PlaceType

source§

fn cmp(&self, other: &PlaceType) -> 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<PlaceType> for PlaceType

source§

fn eq(&self, other: &PlaceType) -> 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<PlaceType> for PlaceType

source§

fn partial_cmp(&self, other: &PlaceType) -> 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 PlaceType

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 PlaceType

source§

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

Gets a PlaceType enum from a String that contains a supported place type code.

§

type Error = Error

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

impl Eq for PlaceType

source§

impl StructuralEq for PlaceType

source§

impl StructuralPartialEq for PlaceType

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