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<'de> Deserialize<'de> for Place
impl<'de> Deserialize<'de> for Place
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
source§impl PartialEq<Place> for Place
impl PartialEq<Place> for Place
impl Eq for Place
impl StructuralEq for Place
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.