Skip to main content

Error

Enum Error 

Source
pub enum Error<I2cError> {
    Bus(I2cError),
    InvalidDevice {
        id: u8,
    },
    InvalidConfig {
        reason: ConfigError,
    },
    Timeout {
        stage: InitStage,
    },
    NoSampleReady,
    InitConsumed,
}

Variants§

§

Bus(I2cError)

§

InvalidDevice

Fields

§id: u8
§

InvalidConfig

Fields

§

Timeout

Fields

§

NoSampleReady

§

InitConsumed

Trait Implementations§

Source§

impl<I2cError: Debug> Debug for Error<I2cError>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<I2cError> From<I2cError> for Error<I2cError>

Source§

fn from(value: I2cError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<I2cError> Forget for Error<I2cError>

§

impl<I2cError> Freeze for Error<I2cError>
where I2cError: Freeze,

§

impl<I2cError> Move for Error<I2cError>

§

impl<I2cError> RefUnwindSafe for Error<I2cError>
where I2cError: RefUnwindSafe,

§

impl<I2cError> Send for Error<I2cError>
where I2cError: Send,

§

impl<I2cError> Sync for Error<I2cError>
where I2cError: Sync,

§

impl<I2cError> Unpin for Error<I2cError>
where I2cError: Unpin,

§

impl<I2cError> UnsafeUnpin for Error<I2cError>
where I2cError: UnsafeUnpin,

§

impl<I2cError> UnwindSafe for Error<I2cError>
where I2cError: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.