#[non_exhaustive]pub enum I2cDevError {
ConnectorNotFound {
connector: String,
},
ConnectorHasNoDdcAdapter {
connector: String,
},
DdcAdapterIndexUnparseable {
symlink_target: PathBuf,
},
DeviceOpenFailed {
path: PathBuf,
source: Error,
},
Transaction(I2cTransactionError),
}Expand description
The error type for all fallible operations in this crate.
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.
ConnectorNotFound
The specified DRM connector was not found in sysfs.
ConnectorHasNoDdcAdapter
The connector exists in sysfs but has no ddc symlink.
Common for non-HDMI connectors and HDMI ports with no sink attached.
DdcAdapterIndexUnparseable
The ddc symlink exists but its target does not contain a recognizable
adapter index. This indicates an unexpected sysfs layout.
DeviceOpenFailed
The /dev/i2c-N device could not be opened.
Fields
Transaction(I2cTransactionError)
An I²C transaction failed.
Trait Implementations§
Source§impl Debug for I2cDevError
impl Debug for I2cDevError
Source§impl Display for I2cDevError
impl Display for I2cDevError
Source§impl Error for I2cDevError
impl Error for I2cDevError
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 !RefUnwindSafe for I2cDevError
impl !UnwindSafe for I2cDevError
impl Freeze for I2cDevError
impl Send for I2cDevError
impl Sync for I2cDevError
impl Unpin for I2cDevError
impl UnsafeUnpin for I2cDevError
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