met_office_api/models/
unit.rs

1/*
2 * Global three hourly spot data
3 *
4 * This API provides three hourly weather forecast data for a requested coordinate defined by a latitude and longitude. The format of the data is GeoJSON.
5 *
6 * The version of the OpenAPI document: 1.0.1
7 * Contact: enquiries@metoffice.gov.uk
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12
13
14#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
15pub struct Unit {
16    /// The name of the unit
17    #[serde(rename = "label")]
18    pub label: String,
19    #[serde(rename = "symbol")]
20    pub symbol: Box<crate::models::Symbol>,
21}
22
23impl Unit {
24    pub fn new(label: String, symbol: crate::models::Symbol) -> Unit {
25        Unit {
26            label,
27            symbol: Box::new(symbol),
28        }
29    }
30}
31
32