pub struct SensorData {
pub temperature: f32,
pub humidity: f32,
pub heat_index: f32,
}
Expand description
A single reading for a DHT sensor.
Fields§
§temperature: f32
§humidity: f32
§heat_index: f32
Trait Implementations§
Source§impl Clone for SensorData
impl Clone for SensorData
Source§fn clone(&self) -> SensorData
fn clone(&self) -> SensorData
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 SensorData
impl Debug for SensorData
Source§impl<'de> Deserialize<'de> for SensorData
impl<'de> Deserialize<'de> for SensorData
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<DhtDataRaw> for SensorData
Convert the RAW Json to SensorData so it can be re-serialized with full field names.
impl From<DhtDataRaw> for SensorData
Convert the RAW Json to SensorData so it can be re-serialized with full field names.
Source§fn from(data: DhtDataRaw) -> Self
fn from(data: DhtDataRaw) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SensorData
impl PartialEq for SensorData
Source§impl Serialize for SensorData
impl Serialize for SensorData
impl Copy for SensorData
impl StructuralPartialEq for SensorData
Auto Trait Implementations§
impl Freeze for SensorData
impl RefUnwindSafe for SensorData
impl Send for SensorData
impl Sync for SensorData
impl Unpin for SensorData
impl UnwindSafe for SensorData
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