Enum dht_embedded::DhtError
source · pub enum DhtError<HE> {
NotPresent,
ChecksumMismatch(u8, u8),
InvalidData,
Timeout,
DelayError,
PinError(HE),
}Expand description
A type detailing various errors the DHT sensor can return
Variants§
NotPresent
The DHT sensor was not found on the specified GPIO
ChecksumMismatch(u8, u8)
The checksum provided in the DHT sensor data did not match the checksum of the data itself (expected, calculated)
InvalidData
The seemingly-valid data has impossible values (e.g. a humidity value less than 0 or greater than 100)
Timeout
The read timed out
DelayError
Received a low-level error from the HAL while sleeping
PinError(HE)
Received a low-level error from the HAL while reading or writing to pins
Trait Implementations§
source§impl<HE: Debug> Error for DhtError<HE>
impl<HE: Debug> Error for DhtError<HE>
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()