pub enum Sen66Error<I2C: Error> {
DataError(DataError),
FailedCo2Recalibration,
I2cError(I2C),
DeviceError(DeviceError),
WrongState(&'static str),
}Expand description
Error variants emitted when interacting with the sensor.
Variants§
DataError(DataError)
Emitted when an error handling the data has occurred.
FailedCo2Recalibration
Emitted when the sensor reports a failed forced CO2 recalibration.
I2cError(I2C)
Emitted when an error from the I2C bus has occurred.
DeviceError(DeviceError)
Emitted when the sensor has an set error flag.
WrongState(&'static str)
Emitted when a command is called in the wrong operating state. Use start_measurement to enter the measuring State, use stop_measurement to enter the idle state.
Trait Implementations§
Source§impl<I2C> Display for Sen66Error<I2C>
impl<I2C> Display for Sen66Error<I2C>
Source§impl<I2C> Error for Sen66Error<I2C>
impl<I2C> Error for Sen66Error<I2C>
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<I2C: Error> From<DeviceError> for Sen66Error<I2C>
impl<I2C: Error> From<DeviceError> for Sen66Error<I2C>
Source§fn from(source: DeviceError) -> Self
fn from(source: DeviceError) -> Self
Converts to this type from the input type.
Source§impl<I2C: Error> From<I2C> for Sen66Error<I2C>
impl<I2C: Error> From<I2C> for Sen66Error<I2C>
impl<I2C: Error> StructuralPartialEq for Sen66Error<I2C>
Auto Trait Implementations§
impl<I2C> Freeze for Sen66Error<I2C>where
I2C: Freeze,
impl<I2C> RefUnwindSafe for Sen66Error<I2C>where
I2C: RefUnwindSafe,
impl<I2C> Send for Sen66Error<I2C>where
I2C: Send,
impl<I2C> Sync for Sen66Error<I2C>where
I2C: Sync,
impl<I2C> Unpin for Sen66Error<I2C>where
I2C: Unpin,
impl<I2C> UnwindSafe for Sen66Error<I2C>where
I2C: 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