pub struct PlaceResult {Show 14 fields
pub address_components: Option<Vec<AddressComponent>>,
pub adr_address: Option<String>,
pub formatted_address: Option<String>,
pub geometry: Option<PlaceGeometry>,
pub icon: Option<String>,
pub icon_background_color: Option<String>,
pub icon_mask_base_uri: Option<String>,
pub name: Option<String>,
pub place_id: Option<String>,
pub reference: Option<String>,
pub types: Option<Vec<AddressType>>,
pub url: Option<String>,
pub utc_offset: Option<i32>,
pub vicinity: Option<String>,
}Expand description
Attributes describing a place https://developers.google.com/maps/documentation/places/web-service/details#Place
Fields§
§address_components: Option<Vec<AddressComponent>>§adr_address: Option<String>§formatted_address: Option<String>§geometry: Option<PlaceGeometry>§icon: Option<String>§icon_background_color: Option<String>§icon_mask_base_uri: Option<String>§name: Option<String>§place_id: Option<String>§reference: Option<String>§types: Option<Vec<AddressType>>§url: Option<String>§utc_offset: Option<i32>§vicinity: Option<String>Implementations§
Source§impl PlaceResult
impl PlaceResult
Sourcepub fn address_component(
&self,
address_type: &AddressType,
) -> Option<&AddressComponent>
pub fn address_component( &self, address_type: &AddressType, ) -> Option<&AddressComponent>
Obtain address component based on AddressType
Sourcepub fn street_number(&self) -> Option<&str>
pub fn street_number(&self) -> Option<&str>
Obtain street number from address_components
Sourcepub fn sublocality(&self) -> Option<&str>
pub fn sublocality(&self) -> Option<&str>
Obtain sublocality from address_components
Sourcepub fn postal_code(&self) -> Option<&str>
pub fn postal_code(&self) -> Option<&str>
Obtain postal code from address_components
Sourcepub fn country_code(&self) -> Option<&str>
pub fn country_code(&self) -> Option<&str>
Obtain country code from address_components
Trait Implementations§
Source§impl Debug for PlaceResult
impl Debug for PlaceResult
Source§impl<'de> Deserialize<'de> for PlaceResult
impl<'de> Deserialize<'de> for PlaceResult
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PlaceResult
impl RefUnwindSafe for PlaceResult
impl Send for PlaceResult
impl Sync for PlaceResult
impl Unpin for PlaceResult
impl UnwindSafe for PlaceResult
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
Mutably borrows from an owned value. Read more