naq_domain

Crates.ionaq_domain
lib.rsnaq_domain
version0.1.0
sourcesrc
created_at2021-09-18 13:57:24.378165
updated_at2021-09-18 13:57:24.378165
descriptionDomain library for nordic air quality (naq) that defines shared domain data structures.
homepage
repositoryhttps://github.com/debuglines/nordic_air_quality
max_upload_size
id453309
size4,240
(debuglines)

documentation

README

Nordic air quality: domain library

Domain library that defines shared domain data structures.

Usage

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,
}
Commit count: 4

cargo fmt