Skip to main content

CommandError

Enum CommandError 

Source
pub enum CommandError<B: SpiDevice<u8>, P: OutputPin> {
    TransferError(B::Error),
    HoldPinError(P::Error),
    WriteProtectionPinError(P::Error),
    Busy,
    InvalidAddress,
    BufferTooSmall,
    BufferUneven,
}
Expand description

Error when communicating with the device

Variants§

§

TransferError(B::Error)

SPI transfer error

§

HoldPinError(P::Error)

Error while setting GPIO state of HOLD pin

§

WriteProtectionPinError(P::Error)

Error while setting GPIO state of WP pin

§

Busy

Chip is still busy executing another operation

§

InvalidAddress

The given memory address is out of range

§

BufferTooSmall

The given buffer size is too small for the called operation

§

BufferUneven

The called operation requires an even buffer size

Trait Implementations§

Source§

impl<B: SpiDevice<u8>, P: OutputPin> Debug for CommandError<B, P>
where P::Error: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<B: Eq + SpiDevice<u8>, P: Eq + OutputPin> Eq for CommandError<B, P>
where B::Error: Eq, P::Error: Eq,

Source§

impl<B: PartialEq + SpiDevice<u8>, P: PartialEq + OutputPin> PartialEq for CommandError<B, P>
where B::Error: PartialEq, P::Error: PartialEq,

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<B: PartialEq + SpiDevice<u8>, P: PartialEq + OutputPin> StructuralPartialEq for CommandError<B, P>
where B::Error: PartialEq, P::Error: PartialEq,

Auto Trait Implementations§

§

impl<B, P> Freeze for CommandError<B, P>
where <B as ErrorType>::Error: Freeze, <P as ErrorType>::Error: Freeze,

§

impl<B, P> RefUnwindSafe for CommandError<B, P>

§

impl<B, P> Send for CommandError<B, P>
where <B as ErrorType>::Error: Send, <P as ErrorType>::Error: Send,

§

impl<B, P> Sync for CommandError<B, P>
where <B as ErrorType>::Error: Sync, <P as ErrorType>::Error: Sync,

§

impl<B, P> Unpin for CommandError<B, P>
where <B as ErrorType>::Error: Unpin, <P as ErrorType>::Error: Unpin,

§

impl<B, P> UnsafeUnpin for CommandError<B, P>

§

impl<B, P> UnwindSafe for CommandError<B, P>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.