Skip to main content

MatrixError

Enum MatrixError 

Source
pub enum MatrixError<RowError, ColumnError> {
    Column {
        column: usize,
        source: ColumnError,
    },
    Row {
        row: usize,
        column: usize,
        source: RowError,
    },
}
Expand description

Error returned by ButtonMatrix::scan.

Variants§

§

Column

Failed to drive a column output.

Fields

§column: usize

Column index.

§source: ColumnError

Original GPIO error.

§

Row

Failed to read a row input while a column was selected.

Fields

§row: usize

Row index.

§column: usize

Selected column index.

§source: RowError

Original GPIO error.

Trait Implementations§

Source§

impl<RowError: Clone, ColumnError: Clone> Clone for MatrixError<RowError, ColumnError>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<RowError: Copy, ColumnError: Copy> Copy for MatrixError<RowError, ColumnError>

Source§

impl<RowError: Debug, ColumnError: Debug> Debug for MatrixError<RowError, ColumnError>

Source§

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

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

impl<RowError: Eq, ColumnError: Eq> Eq for MatrixError<RowError, ColumnError>

Source§

impl<RowError: PartialEq, ColumnError: PartialEq> PartialEq for MatrixError<RowError, ColumnError>

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<RowError: PartialEq, ColumnError: PartialEq> StructuralPartialEq for MatrixError<RowError, ColumnError>

Auto Trait Implementations§

§

impl<RowError, ColumnError> Forget for MatrixError<RowError, ColumnError>

§

impl<RowError, ColumnError> Freeze for MatrixError<RowError, ColumnError>
where ColumnError: Freeze, RowError: Freeze,

§

impl<RowError, ColumnError> Move for MatrixError<RowError, ColumnError>

§

impl<RowError, ColumnError> RefUnwindSafe for MatrixError<RowError, ColumnError>
where ColumnError: RefUnwindSafe, RowError: RefUnwindSafe,

§

impl<RowError, ColumnError> Send for MatrixError<RowError, ColumnError>
where ColumnError: Send, RowError: Send,

§

impl<RowError, ColumnError> Sync for MatrixError<RowError, ColumnError>
where ColumnError: Sync, RowError: Sync,

§

impl<RowError, ColumnError> Unpin for MatrixError<RowError, ColumnError>
where ColumnError: Unpin, RowError: Unpin,

§

impl<RowError, ColumnError> UnsafeUnpin for MatrixError<RowError, ColumnError>
where ColumnError: UnsafeUnpin, RowError: UnsafeUnpin,

§

impl<RowError, ColumnError> UnwindSafe for MatrixError<RowError, ColumnError>
where ColumnError: UnwindSafe, RowError: UnwindSafe,

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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.