pub struct DhtSensors {
pub timestamp: DateTime<Utc>,
pub data: HashMap<String, SensorData>,
}
Expand description
Container of measurements from all DHT sensors in one reading.
The JSON serialization is not compact. For smaller JSON messages, use DhtSensorsSerde
.
Fields§
§timestamp: DateTime<Utc>
§data: HashMap<String, SensorData>
Implementations§
Source§impl DhtSensors
impl DhtSensors
Sourcepub fn from_serde(data: DhtSensorsSerde) -> Result<DhtSensors>
pub fn from_serde(data: DhtSensorsSerde) -> Result<DhtSensors>
Decode a DntSensorsSerde
struct into DhtSensors.
If not all hashmaps in DhtSensorsPacked have
Trait Implementations§
Source§impl Debug for DhtSensors
impl Debug for DhtSensors
Source§impl<'de> Deserialize<'de> for DhtSensors
impl<'de> Deserialize<'de> for DhtSensors
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<DhtSensors> for DhtSensorsSerde
impl From<DhtSensors> for DhtSensorsSerde
Source§fn from(data: DhtSensors) -> DhtSensorsSerde
fn from(data: DhtSensors) -> DhtSensorsSerde
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DhtSensors
impl RefUnwindSafe for DhtSensors
impl Send for DhtSensors
impl Sync for DhtSensors
impl Unpin for DhtSensors
impl UnwindSafe for DhtSensors
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