libtad_models/places/
location.rs

1use super::Geo;
2use crate::{
3    astronomy::Astronomy,
4    time::{Time, TimeChange},
5};
6use serde::Deserialize;
7
8#[derive(Deserialize)]
9/// Information about a location.
10pub struct Location {
11    /// The id of the location.
12    pub id: String,
13
14    /// The part of the queried placeid that this location matches.
15    #[serde(alias = "matches")]
16    pub matchparam: String,
17
18    /// Geographical information about the location.
19    pub geo: Geo,
20
21    /// Time information. Only present if requested.
22    pub time: Option<Time>,
23
24    /// Time changes (daylight savings time). Only present if requested and information is
25    /// available.
26    pub timechanges: Option<Vec<TimeChange>>,
27
28    /// Astronomical information - sunrise and sunset times. Only for the timeservice and if
29    /// requested.
30    pub astronomy: Option<Astronomy>,
31}