pmbus_adapter/error.rs
1/// Errors that can occur during PMBus operations.
2#[derive(Debug)]
3pub enum PmbusError<E> {
4 /// Underlying bus (I2C/SMBus) error.
5 Bus(E),
6 /// A value could not be encoded into the PMBus format.
7 EncodingError,
8 /// The device response had an unexpected length.
9 InvalidResponseLength,
10}
11
12impl<E> From<E> for PmbusError<E> {
13 fn from(e: E) -> Self {
14 PmbusError::Bus(e)
15 }
16}