pub enum Error<E> {
I2c(E),
VoltageTooHigh,
VoltageTooLow,
NotInitialized,
NotReady,
}
Expand description
All possible errors in this crate
Variants§
I2c(E)
I2C bus error
VoltageTooHigh
Voltage is too high to be measured.
VoltageTooLow
Voltage is too low to be measured.
NotInitialized
A measurement in continuous mode has been triggered without previously writing the configuration to the device.
NotReady
A measurement returned a stale result.
In continuous mode, this can happen if you poll faster than the sample rate. See datasheet section 5.1.1 for more details.
In one-shot mode, this is probably a timing bug that should be reported to https://github.com/dbrgn/mcp3425-rs/issues/!
Trait Implementations§
Auto Trait Implementations§
impl<E> RefUnwindSafe for Error<E>where
E: RefUnwindSafe,
impl<E> Send for Error<E>where
E: Send,
impl<E> Sync for Error<E>where
E: Sync,
impl<E> Unpin for Error<E>where
E: Unpin,
impl<E> UnwindSafe for Error<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