pub enum Scd41Error<E> {
I2c(E),
CrcMismatch {
expected: u8,
actual: u8,
bytes: [u8; 2],
},
DataNotReady,
RecalibrationFailed,
}Expand description
Errors that can occur when interacting with the SCD41 sensor.
Variants§
I2c(E)
I2C communication error.
CrcMismatch
CRC mismatch when reading data from the sensor.
Fields
DataNotReady
Data not ready yet (e.g., when calling read_measurement before the sensor has finished).
RecalibrationFailed
Recalibration failed.
Trait Implementations§
Source§impl<E: Debug> Debug for Scd41Error<E>
impl<E: Debug> Debug for Scd41Error<E>
Source§impl<E: Display> Display for Scd41Error<E>
impl<E: Display> Display for Scd41Error<E>
Source§impl<E: Debug + Display> Error for Scd41Error<E>
impl<E: Debug + Display> Error for Scd41Error<E>
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<E> Freeze for Scd41Error<E>where
E: Freeze,
impl<E> RefUnwindSafe for Scd41Error<E>where
E: RefUnwindSafe,
impl<E> Send for Scd41Error<E>where
E: Send,
impl<E> Sync for Scd41Error<E>where
E: Sync,
impl<E> Unpin for Scd41Error<E>where
E: Unpin,
impl<E> UnsafeUnpin for Scd41Error<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for Scd41Error<E>where
E: 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