Enum sen0177::SensorError
source · pub enum SensorError<E: Debug> {
BadMagic,
ChecksumMismatch,
ReadError(E),
}
Expand description
Describes errors returned by the air quality sensor
Variants§
BadMagic
Couldn’t find the “magic” bytes that indicate the start of a data frame
This likely means that you’ve set an incorrect baud rate, or there is something noisy about your connection to the device.
ChecksumMismatch
The checksum provided in the sensor data did not match the checksum of the data itself
Retrying the read will usually clear up the problem.
ReadError(E)
Read error from the serial device or I2C bus
Trait Implementations§
source§impl<E: Debug> Display for SensorError<E>
impl<E: Debug> Display for SensorError<E>
source§impl<E: Debug> Error for SensorError<E>
impl<E: Debug> Error for SensorError<E>
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()
Auto Trait Implementations§
impl<E> RefUnwindSafe for SensorError<E>where
E: RefUnwindSafe,
impl<E> Send for SensorError<E>where
E: Send,
impl<E> Sync for SensorError<E>where
E: Sync,
impl<E> Unpin for SensorError<E>where
E: Unpin,
impl<E> UnwindSafe for SensorError<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