Expand description
A rust library for interacting with the Geocode API.
For more information, the Geocode API documentation is available at: https://developers.google.com/maps/documentation/geocoding/overview
Example:
use google_geocode::Geocode;
use serde::{Deserialize, Serialize};
async fn geocode() {
// Initialize the Geocode client.
let geocode = Geocode::new_from_env();
// Get geolocation data.
let g = geocode.get("some address").await.unwrap();
println!("{:?}", g);
}
Structs§
- APIError
- Error type returned by our library.
- Address
Component - One component of a separated address
- Coordinates
- WGS-84 coordinates that support serializing and deserializing
- Formatted
Address - A human-readable address of this location.
- Geocode
- Entrypoint for interacting with the Geocode API.
- Geometry
- Position information
- PlaceId
- A unique identifier that can be used with other Google APIs. For example, you can use the place_id in a Places SDK request to get details of a local business, such as phone number, opening hours, user reviews, and more. See the place ID overview.
- Reply
- A reply from the Google geocoding API
- Viewport
Enums§
- Language
- Language that gets serialized as a language code
- Location
Type - What location Geometry refers to
- Region
- Country Code Top-Level Domain From https://icannwiki.org/Country_code_top-level_domain