Make item/sample fields available to the crate
This commit is contained in:
parent
d0ace275ec
commit
1ae6c896dd
|
@ -299,13 +299,13 @@ impl MapsRefresh for MapsHandle {
|
|||
pub(crate) struct Sample {
|
||||
/// The time(stamp) of the forecast.
|
||||
#[serde(serialize_with = "ts_seconds::serialize")]
|
||||
time: DateTime<Utc>,
|
||||
pub(crate) time: DateTime<Utc>,
|
||||
|
||||
/// The forecasted score.
|
||||
///
|
||||
/// A value in the range `1..=10`.
|
||||
#[serde(rename(serialize = "value"))]
|
||||
score: u8,
|
||||
pub(crate) score: u8,
|
||||
}
|
||||
|
||||
/// Builds a scoring histogram for the map key.
|
||||
|
|
|
@ -41,12 +41,12 @@ struct Row {
|
|||
pub(crate) struct Item {
|
||||
/// The time(stamp) of the forecast.
|
||||
#[serde(serialize_with = "ts_seconds::serialize")]
|
||||
time: DateTime<Utc>,
|
||||
pub(crate) time: DateTime<Utc>,
|
||||
|
||||
/// The forecasted value.
|
||||
///
|
||||
/// Its unit is mm/h.
|
||||
value: f32,
|
||||
pub(crate) value: f32,
|
||||
}
|
||||
|
||||
impl TryFrom<Row> for Item {
|
||||
|
|
|
@ -32,12 +32,12 @@ pub(crate) struct Item {
|
|||
rename(deserialize = "timestamp_measured"),
|
||||
serialize_with = "ts_seconds::serialize"
|
||||
)]
|
||||
time: DateTime<Utc>,
|
||||
pub(crate) time: DateTime<Utc>,
|
||||
|
||||
/// The forecasted value.
|
||||
///
|
||||
/// The unit depends on the selected [metric](Metric).
|
||||
value: f32,
|
||||
pub(crate) value: f32,
|
||||
}
|
||||
|
||||
/// Retrieves the Luchtmeetnet forecasted items for the provided position and metric.
|
||||
|
|
Loading…
Reference in New Issue