1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
//! Resources (enums, structs, methods) for the client to build a Geocoding API //! request for the Google Cloud server. Forward geocoding converts an address //! to a latitude/longitude. mod build; mod execute; mod get; mod new; mod validate; mod with_address; mod with_bounds; mod with_component; mod with_language; mod with_region; pub mod component; pub mod country; use crate::{ bounds::Bounds, geocoding::forward::component::Component, language::Language, region::Region, }; // use /// Use this structure's methods to build your Forward Geocoding API request. /// Latitude/longitude lookup from address. #[derive(Clone, Debug)] pub struct ForwardRequest { // Required parameters: // -------------------- /// Your application's API key. This key identifies your application for /// purposes of quota management. Learn how to [get a /// key](https://developers.google.com/maps/documentation/geocoding/get-api-key). key: String, // Optional parameters: // -------------------- /// The street address that you want to geocode, in the format used by the /// national postal service of the country concerned. Additional address //elements such as business names and unit, suite or floor numbers should be /// avoided. Please refer to [the /// FAQ](https://developers.google.com/maps/faq#geocoder_queryformat) for /// additional guidance. address: Option<String>, /// The bounding box of the viewport within which to bias geocode results /// more prominently. This parameter will only influence, not fully /// restrict, results from the geocoder. (For more information see [Viewport /// Biasing](https://developers.google.com/maps/documentation/geocoding/intro#Viewports).) bounds: Option<Bounds>, /// A components filter with elements. The components filter is also /// accepted as an optional parameter if an `address` is provided. Each /// element in the components filter fully restricts the results from the /// geocoder. See more information about [component /// filtering](https://developers.google.com/maps/documentation/geocoding/intro#ComponentFiltering). components: Option<Vec<Component>>, /// The language in which to return results. language: Option<Language>, /// The region code, specified as a ccTLD ("top-level domain") two-character /// value. This parameter will only influence, not fully restrict, results /// from the geocoder. (For more information see [Region /// Biasing](https://developers.google.com/maps/documentation/geocoding/intro#RegionCodes) /// below.) region: Option<Region>, // Internal use only: // ------------------ /// Query string that is to be submitted to the Google Cloud Maps Platform. query: Option<String>, /// Has the request been validated? validated: bool, } // struct