pub struct Place {Show 63 fields
pub name: String,
pub id: String,
pub display_name: Option<LocalizedText>,
pub types: Vec<String>,
pub primary_type: String,
pub primary_type_display_name: Option<LocalizedText>,
pub national_phone_number: String,
pub international_phone_number: String,
pub formatted_address: String,
pub short_formatted_address: String,
pub address_components: Vec<AddressComponent>,
pub plus_code: Option<PlusCode>,
pub location: Option<LatLng>,
pub viewport: Option<Viewport>,
pub rating: f64,
pub google_maps_uri: String,
pub website_uri: String,
pub reviews: Vec<Review>,
pub regular_opening_hours: Option<OpeningHours>,
pub utc_offset_minutes: Option<i32>,
pub photos: Vec<Photo>,
pub adr_format_address: String,
pub business_status: i32,
pub price_level: i32,
pub attributions: Vec<Attribution>,
pub user_rating_count: Option<i32>,
pub icon_mask_base_uri: String,
pub icon_background_color: String,
pub takeout: Option<bool>,
pub delivery: Option<bool>,
pub dine_in: Option<bool>,
pub curbside_pickup: Option<bool>,
pub reservable: Option<bool>,
pub serves_breakfast: Option<bool>,
pub serves_lunch: Option<bool>,
pub serves_dinner: Option<bool>,
pub serves_beer: Option<bool>,
pub serves_wine: Option<bool>,
pub serves_brunch: Option<bool>,
pub serves_vegetarian_food: Option<bool>,
pub current_opening_hours: Option<OpeningHours>,
pub current_secondary_opening_hours: Vec<OpeningHours>,
pub regular_secondary_opening_hours: Vec<OpeningHours>,
pub editorial_summary: Option<LocalizedText>,
pub outdoor_seating: Option<bool>,
pub live_music: Option<bool>,
pub menu_for_children: Option<bool>,
pub serves_cocktails: Option<bool>,
pub serves_dessert: Option<bool>,
pub serves_coffee: Option<bool>,
pub good_for_children: Option<bool>,
pub allows_dogs: Option<bool>,
pub restroom: Option<bool>,
pub good_for_groups: Option<bool>,
pub good_for_watching_sports: Option<bool>,
pub payment_options: Option<PaymentOptions>,
pub parking_options: Option<ParkingOptions>,
pub sub_destinations: Vec<SubDestination>,
pub accessibility_options: Option<AccessibilityOptions>,
pub fuel_options: Option<FuelOptions>,
pub ev_charge_options: Option<EvChargeOptions>,
pub generative_summary: Option<GenerativeSummary>,
pub area_summary: Option<AreaSummary>,
}
Expand description
All the information representing a Place.
Fields§
§name: String
This Place’s resource name, in places/{place_id}
format. Can be used to
look up the Place.
id: String
The unique identifier of a place.
display_name: Option<LocalizedText>
The localized name of the place, suitable as a short human-readable description. For example, “Google Sydney”, “Starbucks”, “Pyrmont”, etc.
types: Vec<String>
A set of type tags for this result. For example, “political” and “locality”. For the complete list of possible values, see Table A and Table B at https://developers.google.com/maps/documentation/places/web-service/place-types
primary_type: String
The primary type of the given result. This type must one of the Places API supported types. For example, “restaurant”, “cafe”, “airport”, etc. A place can only have a single primary type. For the complete list of possible values, see Table A and Table B at https://developers.google.com/maps/documentation/places/web-service/place-types
primary_type_display_name: Option<LocalizedText>
The display name of the primary type, localized to the request language if applicable. For the complete list of possible values, see Table A and Table B at https://developers.google.com/maps/documentation/places/web-service/place-types
national_phone_number: String
A human-readable phone number for the place, in national format.
international_phone_number: String
A human-readable phone number for the place, in international format.
formatted_address: String
A full, human-readable address for this place.
short_formatted_address: String
A short, human-readable address for this place.
address_components: Vec<AddressComponent>
Repeated components for each locality level. Note the following facts about the address_components[] array:
- The array of address components may contain more components than the formatted_address.
- The array does not necessarily include all the political entities that contain an address, apart from those included in the formatted_address. To retrieve all the political entities that contain a specific address, you should use reverse geocoding, passing the latitude/longitude of the address as a parameter to the request.
- The format of the response is not guaranteed to remain the same between requests. In particular, the number of address_components varies based on the address requested and can change over time for the same address. A component can change position in the array. The type of the component can change. A particular component may be missing in a later response.
plus_code: Option<PlusCode>
Plus code of the place location lat/long.
location: Option<LatLng>
The position of this place.
viewport: Option<Viewport>
A viewport suitable for displaying the place on an average-sized map.
rating: f64
A rating between 1.0 and 5.0, based on user reviews of this place.
google_maps_uri: String
A URL providing more information about this place.
website_uri: String
The authoritative website for this place, e.g. a business’ homepage. Note that for places that are part of a chain (e.g. an IKEA store), this will usually be the website for the individual store, not the overall chain.
reviews: Vec<Review>
List of reviews about this place, sorted by relevance. A maximum of 5 reviews can be returned.
regular_opening_hours: Option<OpeningHours>
The regular hours of operation.
utc_offset_minutes: Option<i32>
Number of minutes this place’s timezone is currently offset from UTC. This is expressed in minutes to support timezones that are offset by fractions of an hour, e.g. X hours and 15 minutes.
photos: Vec<Photo>
Information (including references) about photos of this place. A maximum of 10 photos can be returned.
adr_format_address: String
The place’s address in adr microformat: http://microformats.org/wiki/adr.
business_status: i32
The business status for the place.
price_level: i32
Price level of the place.
attributions: Vec<Attribution>
A set of data provider that must be shown with this result.
user_rating_count: Option<i32>
The total number of reviews (with or without text) for this place.
icon_mask_base_uri: String
A truncated URL to an icon mask. User can access different icon type by appending type suffix to the end (eg, “.svg” or “.png”).
icon_background_color: String
Background color for icon_mask in hex format, e.g. #909CE1.
takeout: Option<bool>
Specifies if the business supports takeout.
delivery: Option<bool>
Specifies if the business supports delivery.
dine_in: Option<bool>
Specifies if the business supports indoor or outdoor seating options.
curbside_pickup: Option<bool>
Specifies if the business supports curbside pickup.
reservable: Option<bool>
Specifies if the place supports reservations.
serves_breakfast: Option<bool>
Specifies if the place serves breakfast.
serves_lunch: Option<bool>
Specifies if the place serves lunch.
serves_dinner: Option<bool>
Specifies if the place serves dinner.
serves_beer: Option<bool>
Specifies if the place serves beer.
serves_wine: Option<bool>
Specifies if the place serves wine.
serves_brunch: Option<bool>
Specifies if the place serves brunch.
serves_vegetarian_food: Option<bool>
Specifies if the place serves vegetarian food.
current_opening_hours: Option<OpeningHours>
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.
current_secondary_opening_hours: Vec<OpeningHours>
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.
regular_secondary_opening_hours: Vec<OpeningHours>
Contains an array of entries for information about regular 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.
editorial_summary: Option<LocalizedText>
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.
outdoor_seating: Option<bool>
Place provides outdoor seating.
live_music: Option<bool>
Place provides live music.
Place has a children’s menu.
serves_cocktails: Option<bool>
Place serves cocktails.
serves_dessert: Option<bool>
Place serves dessert.
serves_coffee: Option<bool>
Place serves coffee.
good_for_children: Option<bool>
Place is good for children.
allows_dogs: Option<bool>
Place allows dogs.
restroom: Option<bool>
Place has restroom.
good_for_groups: Option<bool>
Place accommodates groups.
good_for_watching_sports: Option<bool>
Place is suitable for watching sports.
payment_options: Option<PaymentOptions>
Payment options the place accepts. If a payment option data is not available, the payment option field will be unset.
parking_options: Option<ParkingOptions>
Options of parking provided by the place.
sub_destinations: Vec<SubDestination>
A list of sub destinations related to the place.
accessibility_options: Option<AccessibilityOptions>
Information about the accessibility options a place offers.
fuel_options: Option<FuelOptions>
The most recent information about fuel options in a gas station. This information is updated regularly.
ev_charge_options: Option<EvChargeOptions>
Information of ev charging options.
generative_summary: Option<GenerativeSummary>
Experimental: See https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative for more details.
AI-generated summary of the place.
area_summary: Option<AreaSummary>
Experimental: See https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative for more details.
AI-generated summary of the area that the place is in.
Implementations§
source§impl Place
impl Place
sourcepub fn utc_offset_minutes(&self) -> i32
pub fn utc_offset_minutes(&self) -> i32
Returns the value of utc_offset_minutes
, or the default value if utc_offset_minutes
is unset.
sourcepub fn business_status(&self) -> BusinessStatus
pub fn business_status(&self) -> BusinessStatus
Returns the enum value of business_status
, or the default if the field is set to an invalid enum value.
sourcepub fn set_business_status(&mut self, value: BusinessStatus)
pub fn set_business_status(&mut self, value: BusinessStatus)
Sets business_status
to the provided enum value.
sourcepub fn price_level(&self) -> PriceLevel
pub fn price_level(&self) -> PriceLevel
Returns the enum value of price_level
, or the default if the field is set to an invalid enum value.
sourcepub fn set_price_level(&mut self, value: PriceLevel)
pub fn set_price_level(&mut self, value: PriceLevel)
Sets price_level
to the provided enum value.
sourcepub fn user_rating_count(&self) -> i32
pub fn user_rating_count(&self) -> i32
Returns the value of user_rating_count
, or the default value if user_rating_count
is unset.
sourcepub fn takeout(&self) -> bool
pub fn takeout(&self) -> bool
Returns the value of takeout
, or the default value if takeout
is unset.
sourcepub fn delivery(&self) -> bool
pub fn delivery(&self) -> bool
Returns the value of delivery
, or the default value if delivery
is unset.
sourcepub fn dine_in(&self) -> bool
pub fn dine_in(&self) -> bool
Returns the value of dine_in
, or the default value if dine_in
is unset.
sourcepub fn curbside_pickup(&self) -> bool
pub fn curbside_pickup(&self) -> bool
Returns the value of curbside_pickup
, or the default value if curbside_pickup
is unset.
sourcepub fn reservable(&self) -> bool
pub fn reservable(&self) -> bool
Returns the value of reservable
, or the default value if reservable
is unset.
sourcepub fn serves_breakfast(&self) -> bool
pub fn serves_breakfast(&self) -> bool
Returns the value of serves_breakfast
, or the default value if serves_breakfast
is unset.
sourcepub fn serves_lunch(&self) -> bool
pub fn serves_lunch(&self) -> bool
Returns the value of serves_lunch
, or the default value if serves_lunch
is unset.
sourcepub fn serves_dinner(&self) -> bool
pub fn serves_dinner(&self) -> bool
Returns the value of serves_dinner
, or the default value if serves_dinner
is unset.
sourcepub fn serves_beer(&self) -> bool
pub fn serves_beer(&self) -> bool
Returns the value of serves_beer
, or the default value if serves_beer
is unset.
sourcepub fn serves_wine(&self) -> bool
pub fn serves_wine(&self) -> bool
Returns the value of serves_wine
, or the default value if serves_wine
is unset.
sourcepub fn serves_brunch(&self) -> bool
pub fn serves_brunch(&self) -> bool
Returns the value of serves_brunch
, or the default value if serves_brunch
is unset.
sourcepub fn serves_vegetarian_food(&self) -> bool
pub fn serves_vegetarian_food(&self) -> bool
Returns the value of serves_vegetarian_food
, or the default value if serves_vegetarian_food
is unset.
sourcepub fn outdoor_seating(&self) -> bool
pub fn outdoor_seating(&self) -> bool
Returns the value of outdoor_seating
, or the default value if outdoor_seating
is unset.
sourcepub fn live_music(&self) -> bool
pub fn live_music(&self) -> bool
Returns the value of live_music
, or the default value if live_music
is unset.
Returns the value of menu_for_children
, or the default value if menu_for_children
is unset.
sourcepub fn serves_cocktails(&self) -> bool
pub fn serves_cocktails(&self) -> bool
Returns the value of serves_cocktails
, or the default value if serves_cocktails
is unset.
sourcepub fn serves_dessert(&self) -> bool
pub fn serves_dessert(&self) -> bool
Returns the value of serves_dessert
, or the default value if serves_dessert
is unset.
sourcepub fn serves_coffee(&self) -> bool
pub fn serves_coffee(&self) -> bool
Returns the value of serves_coffee
, or the default value if serves_coffee
is unset.
sourcepub fn good_for_children(&self) -> bool
pub fn good_for_children(&self) -> bool
Returns the value of good_for_children
, or the default value if good_for_children
is unset.
sourcepub fn allows_dogs(&self) -> bool
pub fn allows_dogs(&self) -> bool
Returns the value of allows_dogs
, or the default value if allows_dogs
is unset.
sourcepub fn restroom(&self) -> bool
pub fn restroom(&self) -> bool
Returns the value of restroom
, or the default value if restroom
is unset.
sourcepub fn good_for_groups(&self) -> bool
pub fn good_for_groups(&self) -> bool
Returns the value of good_for_groups
, or the default value if good_for_groups
is unset.
sourcepub fn good_for_watching_sports(&self) -> bool
pub fn good_for_watching_sports(&self) -> bool
Returns the value of good_for_watching_sports
, or the default value if good_for_watching_sports
is unset.
Trait Implementations§
source§impl Message for Place
impl Message for Place
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for Place
impl PartialEq for Place
impl StructuralPartialEq for Place
Auto Trait Implementations§
impl Freeze for Place
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request