pub enum Error<BusError>where
BusError: Error,{
BusError(BusError),
IllegalValue {
value: i32,
min: i32,
max: i32,
},
NotReady,
}Expand description
Error type used by the driver.
Variants§
BusError(BusError)
Indicates a communication error on the I2C bus.
IllegalValue
Indicates saturation of the converted value.
NotReady
Indicates that the device’s output buffer does not contain new data.
Trait Implementations§
Source§impl<BusError> Error for Error<BusError>
impl<BusError> Error for Error<BusError>
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<BusError> Freeze for Error<BusError>where
BusError: Freeze,
impl<BusError> RefUnwindSafe for Error<BusError>where
BusError: RefUnwindSafe,
impl<BusError> Send for Error<BusError>where
BusError: Send,
impl<BusError> Sync for Error<BusError>where
BusError: Sync,
impl<BusError> Unpin for Error<BusError>where
BusError: Unpin,
impl<BusError> UnwindSafe for Error<BusError>where
BusError: 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