pub struct HistoryRecord {
pub timestamp: OffsetDateTime,
pub co2: u16,
pub temperature: f32,
pub pressure: f32,
pub humidity: u8,
pub radon: Option<u32>,
pub radiation_rate: Option<f32>,
pub radiation_total: Option<f64>,
}Expand description
A historical reading record from an Aranet sensor.
This struct supports all Aranet device types:
- Aranet4: CO2, temperature, pressure, humidity
- Aranet2: Temperature, humidity (co2 and pressure will be 0)
AranetRn+: Radon, temperature, pressure, humidity (co2 will be 0)- Aranet Radiation: Radiation rate/total, temperature (uses
radiation_*fields)
Fields§
§timestamp: OffsetDateTimeTimestamp of the reading.
co2: u16CO2 concentration in ppm (Aranet4) or 0 for other devices.
temperature: f32Temperature in degrees Celsius.
pressure: f32Atmospheric pressure in hPa (0 for Aranet2).
humidity: u8Relative humidity percentage (0-100).
radon: Option<u32>Radon concentration in Bq/m³ (AranetRn+ only).
radiation_rate: Option<f32>Radiation dose rate in µSv/h (Aranet Radiation only).
radiation_total: Option<f64>Total radiation dose in mSv (Aranet Radiation only).
Implementations§
Source§impl HistoryRecord
impl HistoryRecord
Sourcepub fn builder() -> HistoryRecordBuilder
pub fn builder() -> HistoryRecordBuilder
Create a builder for constructing HistoryRecord with optional fields.
Trait Implementations§
Source§impl Clone for HistoryRecord
impl Clone for HistoryRecord
Source§fn clone(&self) -> HistoryRecord
fn clone(&self) -> HistoryRecord
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HistoryRecord
impl Debug for HistoryRecord
Source§impl Default for HistoryRecord
impl Default for HistoryRecord
Source§fn default() -> HistoryRecord
fn default() -> HistoryRecord
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for HistoryRecord
impl<'de> Deserialize<'de> for HistoryRecord
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<HistoryRecord, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<HistoryRecord, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for HistoryRecord
impl PartialEq for HistoryRecord
Source§impl Serialize for HistoryRecord
impl Serialize for HistoryRecord
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for HistoryRecord
Auto Trait Implementations§
impl Freeze for HistoryRecord
impl RefUnwindSafe for HistoryRecord
impl Send for HistoryRecord
impl Sync for HistoryRecord
impl Unpin for HistoryRecord
impl UnwindSafe for HistoryRecord
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more