pub enum PiFaceDigitalError {
Mcp23s17Error {
source: Mcp23s17Error,
},
HardwareAddressBoundsError(u8),
NoHardwareDetected {
spi_bus: SpiBus,
hardware_address: HardwareAddress,
},
GpioError {
source: Error,
},
}Expand description
Errors that operation of the PiFace Digital can raise.
Variants§
Mcp23s17Error
Errors from the rppal_mcp23s17::Mcp23s17.
Fields
§
source: Mcp23s17ErrorUnderlying error source.
HardwareAddressBoundsError(u8)
Attempt to access a PiFace Digital beyond the hardware address range
(0 - HardwareAddress::MAX_HARDWARE_ADDRESS).
NoHardwareDetected
Failed to detect the presence of any physical PiFace Digital device connected to the SPI bus.
Fields
§
hardware_address: HardwareAddressHardware address of the device we tried to access.
GpioError
Errors accessing the GPIO for the interrupt input.
Trait Implementations§
Source§impl Debug for PiFaceDigitalError
impl Debug for PiFaceDigitalError
Source§impl Display for PiFaceDigitalError
impl Display for PiFaceDigitalError
Source§impl Error for PiFaceDigitalError
impl Error for PiFaceDigitalError
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()
Source§impl From<Error> for PiFaceDigitalError
impl From<Error> for PiFaceDigitalError
Source§impl From<Mcp23s17Error> for PiFaceDigitalError
impl From<Mcp23s17Error> for PiFaceDigitalError
Source§fn from(source: Mcp23s17Error) -> Self
fn from(source: Mcp23s17Error) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PiFaceDigitalError
impl !RefUnwindSafe for PiFaceDigitalError
impl Send for PiFaceDigitalError
impl Sync for PiFaceDigitalError
impl Unpin for PiFaceDigitalError
impl !UnwindSafe for PiFaceDigitalError
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