Struct google_geocoding::Reply [−][src]
pub struct Reply { pub address_components: Vec<AddressComponent>, pub formatted_address: FormattedAddress, pub geometry: Geometry, pub place_id: PlaceId, pub postcode_localities: Option<Vec<String>>, pub types: Vec<Type>, }
A reply from the Google geocoding API
Fields
address_components: Vec<AddressComponent>
The separate components applicable to this address.
formatted_address: FormattedAddress
The human-readable address of this location.
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.
geometry: Geometry
Position information
place_id: PlaceId
A unique identifier that can be used with other Google APIs.
postcode_localities: Option<Vec<String>>
All the localities contained in a postal code. This is only present when the result is a postal code that contains multiple localities.
types: Vec<Type>
The type of the returned result. This array contains a set of zero or more tags identifying the type of feature returned in the result. For example, a geocode of "Chicago" returns "locality" which indicates that "Chicago" is a city, and also returns "political" which indicates it is a political entity.