pub trait DhtSensor<HE> {
// Required method
fn read(&mut self) -> Result<Reading, DhtError<HE>>;
}Expand description
A trait for reading data from the sensor
This level of indirection is useful so you can write generic code that does not assume whether a DHT11 or DHT22 sensor is being used.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".