pub enum DHT11Error {
MissingData,
InvalidChecksum,
}Expand description
Enum representing possible errors during DHT11 sensor communication.
Variants§
MissingData
Bit count mismatch (4 byte data + 1 byte checksum)
InvalidChecksum
The calculated checksum (4 bytes) does not match the 1 byte validation checksum (last 1 byte)
Trait Implementations§
Source§impl Debug for DHT11Error
impl Debug for DHT11Error
Source§impl Display for DHT11Error
impl Display for DHT11Error
Source§impl Error for DHT11Error
impl Error for DHT11Error
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()
Source§impl Sensor<DHT11Result, DHT11Error> for DHT11Controller
impl Sensor<DHT11Result, DHT11Error> for DHT11Controller
Source§fn read_sensor_data(&mut self) -> Result<DHT11Result, DHT11Error>
fn read_sensor_data(&mut self) -> Result<DHT11Result, DHT11Error>
Reads sensor data and returns a result containing either the data or an error.
Auto Trait Implementations§
impl Freeze for DHT11Error
impl RefUnwindSafe for DHT11Error
impl Send for DHT11Error
impl Sync for DHT11Error
impl Unpin for DHT11Error
impl UnwindSafe for DHT11Error
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