#[non_exhaustive]pub enum I2cErrorKind {
AddressNack,
DataNack,
ArbitrationLost,
ClockStretchTimeout,
BusBusy,
BusProtocolError,
AdapterGone,
Unknown {
errno: i32,
},
}Expand description
The class of I²C bus condition that caused the failure.
Variants follow the conventions in Documentation/i2c/fault-codes.rst.
See the amdgpu note in the crate documentation for current hardware
limitations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
AddressNack
The slave did not acknowledge its I²C address byte (ENXIO).
DataNack
The slave acknowledged its address but NACKed a data byte.
ArbitrationLost
Arbitration was lost to another bus master (EAGAIN). Retry is appropriate.
ClockStretchTimeout
The slave held SCL low beyond the adapter timeout threshold (ETIMEDOUT).
BusBusy
The bus was busy and the transaction could not be started (EBUSY).
BusProtocolError
An unexpected START or STOP condition was observed on the bus (EPROTO).
AdapterGone
The I²C adapter was suspended or removed (ESHUTDOWN/ENODEV).
Unknown
An errno that does not map to any known I²C condition.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for I2cErrorKind
impl RefUnwindSafe for I2cErrorKind
impl Send for I2cErrorKind
impl Sync for I2cErrorKind
impl Unpin for I2cErrorKind
impl UnsafeUnpin for I2cErrorKind
impl UnwindSafe for I2cErrorKind
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