Crates.io | naq_domain |
lib.rs | naq_domain |
version | 0.1.0 |
source | src |
created_at | 2021-09-18 13:57:24.378165 |
updated_at | 2021-09-18 13:57:24.378165 |
description | Domain library for nordic air quality (naq) that defines shared domain data structures. |
homepage | |
repository | https://github.com/debuglines/nordic_air_quality |
max_upload_size | |
id | 453309 |
size | 4,240 |
Domain library that defines shared domain data structures.
use naq_domain::SensorData;
fn main() {
let sensor_data = SensorData {
co2: 533.0,
voc: 72.0,
relative_atmospheric_pressure: 1005.92,
relative_humidity_percent: 36.5,
temperature_celsius: 20.42,
radon_short_term: Some(1),
radon_long_term: Some(1),
};
println!("{:#?}", sensor_data);
}
Result
SensorData {
relative_humidity_percent: 36.5,
radon_short_term: Some(
1,
),
radon_long_term: Some(
1,
),
temperature_celsius: 20.42,
relative_atmospheric_pressure: 1005.92,
co2: 533.0,
voc: 72.0,
}