[][src]Enum spi_memory::Error

pub enum Error<SPI: Transfer<u8>, GPIO: OutputPin> {
    Spi(SPI::Error),
    Gpio(GPIO::Error),
    UnexpectedStatus,
    // some variants omitted
}

The error type used by this library.

This can encapsulate an SPI or GPIO error, and adds its own protocol errors on top of that.

Variants

Spi(SPI::Error)

An SPI transfer failed.

Gpio(GPIO::Error)

A GPIO could not be set.

UnexpectedStatus

Status register contained unexpected flags.

This can happen when the chip is faulty, incorrectly connected, or the driver wasn't constructed or destructed properly (eg. while there is still a write in progress).

Trait Implementations

impl<SPI: Transfer<u8>, GPIO: OutputPin> Debug for Error<SPI, GPIO> where
    SPI::Error: Debug,
    GPIO::Error: Debug
[src]

Auto Trait Implementations

impl<SPI, GPIO> Send for Error<SPI, GPIO> where
    <GPIO as OutputPin>::Error: Send,
    <SPI as Transfer<u8>>::Error: Send

impl<SPI, GPIO> Sync for Error<SPI, GPIO> where
    <GPIO as OutputPin>::Error: Sync,
    <SPI as Transfer<u8>>::Error: Sync

impl<SPI, GPIO> Unpin for Error<SPI, GPIO> where
    <GPIO as OutputPin>::Error: Unpin,
    <SPI as Transfer<u8>>::Error: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.