Struct google_maps::places::place::Place

source ·
pub struct Place {
Show 39 fields pub address_components: Option<Vec<AddressComponent>>, pub adr_address: Option<String>, pub business_status: Option<BusinessStatus>, pub curbside_pickup: Option<bool>, pub current_opening_hours: Option<PlaceOpeningHours>, pub delivery: Option<bool>, pub dine_in: Option<bool>, pub editorial_summary: Option<PlaceEditorialSummary>, pub formatted_address: Option<String>, pub formatted_phone_number: Option<String>, pub geometry: Option<Geometry>, pub icon: Option<String>, pub icon_background_color: Option<String>, pub icon_mask_base_uri: Option<String>, pub international_phone_number: Option<String>, pub name: Option<String>, pub opening_hours: Option<PlaceOpeningHours>, pub photos: Option<Vec<PlacePhoto>>, pub place_id: Option<String>, pub price_level: Option<u8>, pub rating: Option<Decimal>, pub reservable: Option<bool>, pub reviews: Option<Vec<PlaceReview>>, pub secondary_opening_hours: Option<PlaceOpeningHours>, pub serves_beer: Option<bool>, pub serves_breakfast: Option<bool>, pub serves_brunch: Option<bool>, pub serves_dinner: Option<bool>, pub serves_lunch: Option<bool>, pub serves_vegetarian_food: Option<bool>, pub serves_wine: Option<bool>, pub takeout: Option<bool>, pub types: Option<Vec<PlaceType>>, pub url: Option<String>, pub user_ratings_total: Option<u16>, pub utc_offset: Option<i32>, pub vicinity: Option<String>, pub website: Option<String>, pub wheelchair_accessible_entrance: Option<bool>,
}
Expand description

Attributes describing a place. Not all attributes will be available for all place types.

Fields§

§address_components: Option<Vec<AddressComponent>>

An array containing the separate components applicable to this address.

See AddressComponent for more information.

§adr_address: Option<String>

A representation of the place’s address in the adr microformat.

§business_status: Option<BusinessStatus>

Indicates the operational status of the place, if it is a business. If no data exists, business_status is not returned.

The allowed values include: OPERATIONAL, CLOSED_TEMPORARILY, and CLOSED_PERMANENTLY

§curbside_pickup: Option<bool>

Specifies if the business supports curbside pickup.

§current_opening_hours: Option<PlaceOpeningHours>

Contains the hours of operation for the next seven days (including today). The time period starts at midnight on the date of the request and ends at 11:59 pm six days later. This field includes the special_days subfield of all hours, set for dates that have exceptional hours.

See PlaceOpeningHours for more information.

§delivery: Option<bool>

Specifies if the business supports delivery.

§dine_in: Option<bool>

Specifies if the business supports indoor or outdoor seating options.

§editorial_summary: Option<PlaceEditorialSummary>

Contains a summary of the place. A summary is comprised of a textual overview, and also includes the language code for these if applicable. Summary text must be presented as-is and can not be modified or altered.

See PlaceEditorialSummary for more information.

§formatted_address: Option<String>

A string containing the human-readable address of this place.

Often this address is equivalent to the postal address. Note that some countries, such as the United Kingdom, do not allow distribution of true postal addresses due to licensing restrictions.

The formatted address is logically composed of one or more address components. For example, the address “111 8th Avenue, New York, NY” consists of the following components: “111” (the street number), “8th Avenue” (the route), “New York” (the city) and “NY” (the US state).

Do not parse the formatted address programmatically. Instead you should use the individual address components, which the API response includes in addition to the formatted address field.

§formatted_phone_number: Option<String>

Contains the place’s phone number in its local format.

§geometry: Option<Geometry>

Contains the location and viewport for the location.

See Geometry for more information.

§icon: Option<String>

Contains the URL of a suggested icon which may be displayed to the user when indicating this result on a map.

§icon_background_color: Option<String>

Contains the default HEX color code for the place’s category.

§icon_mask_base_uri: Option<String>

Contains the URL of a recommended icon, minus the .svg or .png file type extension.

§international_phone_number: Option<String>

Contains the place’s phone number in international format. International format includes the country code, and is prefixed with the plus, +, sign. For example, the international_phone_number for Google’s Sydney, Australia office is +61 2 9374 4000.

§name: Option<String>

Contains the human-readable name for the returned result. For establishment results, this is usually the canonicalized business name.

§opening_hours: Option<PlaceOpeningHours>

Contains the regular hours of operation.

See PlaceOpeningHours for more information.

§photos: Option<Vec<PlacePhoto>>

An array of photo objects, each containing a reference to an image. A request may return up to ten photos. More information about place photos and how you can use the images in your application can be found in the Place Photos documentation.

See PlacePhoto for more information.

§place_id: Option<String>

A textual identifier that uniquely identifies a place. To retrieve information about the place, pass this identifier in the place_id field of a Places API request. For more information about place IDs, see the place ID overview.

§price_level: Option<u8>

The price level of the place, on a scale of 0 to 4. The exact amount indicated by a specific value will vary from region to region. Price levels are interpreted as follows:

  • 0 Free
  • 1 Inexpensive
  • 2 Moderate
  • 3 Expensive
  • 4 Very Expensive
§rating: Option<Decimal>

Contains the place’s rating, from 1.0 to 5.0, based on aggregated user reviews.

§reservable: Option<bool>

Specifies if the place supports reservations.

§reviews: Option<Vec<PlaceReview>>

A JSON array of up to five reviews. By default, the reviews are sorted in order of relevance. Use the reviews_sort request parameter to control sorting.

  • For most_relevant (default), reviews are sorted by relevance; the service will bias the results to return reviews originally written in the preferred language.

  • For newest, reviews are sorted in chronological order; the preferred language does not affect the sort order.

Google recommends indicating to users whether results are ordered by most_relevant or newest.

See PlaceReview for more information.

§secondary_opening_hours: Option<PlaceOpeningHours>

Contains an array of entries for the next seven days including information about secondary hours of a business. Secondary hours are different from a business’s main hours. For example, a restaurant can specify drive through hours or delivery hours as its secondary hours. This field populates the type subfield, which draws from a predefined list of opening hours types (such as DRIVE_THROUGH, PICKUP, or TAKEOUT) based on the types of the place. This field includes the special_days subfield of all hours, set for dates that have exceptional hours.

See PlaceOpeningHours for more information.

§serves_beer: Option<bool>

Specifies if the place serves beer.

§serves_breakfast: Option<bool>

Specifies if the place serves breakfast.

§serves_brunch: Option<bool>

Specifies if the place serves brunch.

§serves_dinner: Option<bool>

Specifies if the place serves dinner.

§serves_lunch: Option<bool>

Specifies if the place serves lunch.

§serves_vegetarian_food: Option<bool>

Specifies if the place serves vegetarian food.

§serves_wine: Option<bool>

Specifies if the place serves wine.

§takeout: Option<bool>

Specifies if the business supports takeout.

§types: Option<Vec<PlaceType>>

Contains an array of feature types describing the given result. See the list of supported types.

§url: Option<String>

Contains the URL of the official Google page for this place. This will be the Google-owned page that contains the best available information about the place. Applications must link to or embed this page on any screen that shows detailed results about the place to the user.

§user_ratings_total: Option<u16>

The total number of reviews, with or without text, for this place.

§utc_offset: Option<i32>

Contains the number of minutes this place’s current timezone is offset from UTC. For example, for places in Sydney, Australia during daylight saving time this would be 660 (+11 hours from UTC), and for places in California outside of daylight saving time this would be -480 (-8 hours from UTC).

§vicinity: Option<String>

For establishment (types:["establishment", ...]) results only, the vicinity field contains a simplified address for the place, including the street name, street number, and locality, but not the province/state, postal code, or country.

For all other results, the vicinity field contains the name of the narrowest political (types:["political", ...]) feature that is present in the address of the result.

This content is meant to be read as-is. Do not programmatically parse the formatted address.

§website: Option<String>

The authoritative website for this place, such as a business’ homepage.

§wheelchair_accessible_entrance: Option<bool>

Specifies if the place has an entrance that is wheelchair-accessible.

Trait Implementations§

source§

impl Clone for Place

source§

fn clone(&self) -> Place

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 Place

source§

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

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

impl<'de> Deserialize<'de> for Place

source§

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 FromStr for Place


source§

fn from_str(s: &str) -> Result<Self, Error>

Parse a Google Maps Places API JSON response into a usable Place struct.

§

type Err = Error

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

impl Hash for Place

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 PartialEq<Place> for Place

source§

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

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 Eq for Place

source§

impl StructuralEq for Place

source§

impl StructuralPartialEq for Place

Auto Trait Implementations§

§

impl RefUnwindSafe for Place

§

impl Send for Place

§

impl Sync for Place

§

impl Unpin for Place

§

impl UnwindSafe for Place

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