Enum mcp3425::Error

source ·
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§

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.