pub struct OpencageResponse<T> where
    T: Float
{ pub documentation: String, pub licenses: Vec<HashMap<String, String>>, pub rate: Option<HashMap<String, i32>>, pub results: Vec<Results<T>>, pub status: Status, pub stay_informed: HashMap<String, String>, pub thanks: String, pub timestamp: Timestamp, pub total_results: i32, }
Expand description

The top-level full JSON response returned by a forward-geocoding request

See the documentation for more details

 {
   "documentation": "https://opencagedata.com/api",
   "licenses": [
     {
       "name": "CC-BY-SA",
       "url": "http://creativecommons.org/licenses/by-sa/3.0/"
     },
     {
       "name": "ODbL",
       "url": "http://opendatacommons.org/licenses/odbl/summary/"
     }
   ],
   "rate": {
     "limit": 2500,
     "remaining": 2499,
     "reset": 1523318400
   },
   "results": [
     {
       "annotations": {
         "DMS": {
           "lat": "41° 24' 5.06412'' N",
           "lng": "2° 7' 43.40064'' E"
         },
         "MGRS": "31TDF2717083684",
         "Maidenhead": "JN11bj56ki",
         "Mercator": {
           "x": 236968.295,
           "y": 5043465.71
         },
         "OSM": {
           "edit_url": "https://www.openstreetmap.org/edit?way=355421084#map=17/41.40141/2.12872",
           "url": "https://www.openstreetmap.org/?mlat=41.40141&mlon=2.12872#map=17/41.40141/2.12872"
         },
         "callingcode": 34,
         "currency": {
           "alternate_symbols": [

           ],
           "decimal_mark": ",",
           "html_entity": "&#x20AC;",
           "iso_code": "EUR",
           "iso_numeric": 978,
           "name": "Euro",
           "smallest_denomination": 1,
           "subunit": "Cent",
           "subunit_to_unit": 100,
           "symbol": "€",
           "symbol_first": 1,
           "thousands_separator": "."
         },
         "flag": "🇪🇸",
         "geohash": "sp3e82yhdvd7p5x1mbdv",
         "qibla": 110.53,
         "sun": {
           "rise": {
             "apparent": 1523251260,
             "astronomical": 1523245440,
             "civil": 1523249580,
             "nautical": 1523247540
           },
           "set": {
             "apparent": 1523298360,
             "astronomical": 1523304180,
             "civil": 1523300040,
             "nautical": 1523302080
           }
         },
         "timezone": {
           "name": "Europe/Madrid",
           "now_in_dst": 1,
           "offset_sec": 7200,
           "offset_string": 200,
           "short_name": "CEST"
         },
         "what3words": {
           "words": "chins.pictures.passes"
         }
       },
       "bounds": {
         "northeast": {
           "lat": 41.4015815,
           "lng": 2.128952
         },
         "southwest": {
           "lat": 41.401227,
           "lng": 2.1284918
         }
       },
       "components": {
         "ISO_3166-1_alpha-2": "ES",
         "_type": "building",
         "city": "Barcelona",
         "city_district": "Sarrià - Sant Gervasi",
         "country": "Spain",
         "country_code": "es",
         "county": "BCN",
         "house_number": "68",
         "political_union": "European Union",
         "postcode": "08017",
         "road": "Carrer de Calatrava",
         "state": "Catalonia",
         "suburb": "les Tres Torres"
       },
       "confidence": 10,
       "formatted": "Carrer de Calatrava, 68, 08017 Barcelona, Spain",
       "geometry": {
         "lat": 41.4014067,
         "lng": 2.1287224
       }
     }
   ],
   "status": {
     "code": 200,
     "message": "OK"
   },
   "stay_informed": {
     "blog": "https://blog.opencagedata.com",
     "twitter": "https://twitter.com/opencagedata"
   },
   "thanks": "For using an OpenCage Data API",
   "timestamp": {
     "created_http": "Mon, 09 Apr 2018 12:33:01 GMT",
     "created_unix": 1523277181
   },
   "total_results": 1
 }

Fields

documentation: Stringlicenses: Vec<HashMap<String, String>>rate: Option<HashMap<String, i32>>results: Vec<Results<T>>status: Statusstay_informed: HashMap<String, String>thanks: Stringtimestamp: Timestamptotal_results: i32

Trait Implementations

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more