pub enum DhtError<HE> {
NotPresent,
ChecksumMismatch(u8, u8),
InvalidData,
Timeout,
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
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)>
Returns 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()
Auto Trait Implementations§
impl<HE> Freeze for DhtError<HE>where
HE: Freeze,
impl<HE> RefUnwindSafe for DhtError<HE>where
HE: RefUnwindSafe,
impl<HE> Send for DhtError<HE>where
HE: Send,
impl<HE> Sync for DhtError<HE>where
HE: Sync,
impl<HE> Unpin for DhtError<HE>where
HE: Unpin,
impl<HE> UnwindSafe for DhtError<HE>where
HE: UnwindSafe,
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