libtad_models/astronomy/
astronomy_object.rs

1use super::{AstronomyEvent, AstronomyObjectType};
2use serde::Deserialize;
3
4#[derive(Deserialize)]
5/// Astronomical information - sunrise and sunset times.
6pub struct AstronomyObject {
7    /// Object name. Currently, the sun is the only supported astronomical object.
8    pub name: AstronomyObjectType,
9
10    /// Lists all sunrise/sunset events during the day.
11    pub events: Vec<AstronomyEvent>,
12
13    /// This element is only present if there are no astronomical events.
14    /// In this case it will indicate if the sun is up or down the whole day.
15    pub special: Option<String>,
16}