Enum ReadingError
pub enum ReadingError {
NonEnabled,
SensorAccess,
NotMeasuring,
}Available on crate feature
sensors only.Expand description
Represents errors happening when accessing a sensor reading.
Variants§
NonEnabled
The sensor driver is not enabled (e.g., it may be disabled or sleeping).
SensorAccess
Cannot access the sensor device (e.g., because of a bus error).
NotMeasuring
No measurement has been triggered before waiting for a reading.
It is necessary to call Sensor::trigger_measurement() before calling
Sensor::wait_for_reading().
Trait Implementations§
§impl Debug for ReadingError
impl Debug for ReadingError
§impl Display for ReadingError
impl Display for ReadingError
§impl Error for ReadingError
impl Error for ReadingError
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 Freeze for ReadingError
impl RefUnwindSafe for ReadingError
impl Send for ReadingError
impl Sync for ReadingError
impl Unpin for ReadingError
impl UnwindSafe for ReadingError
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