[][src]Struct accelerometer::error::Error

pub struct Error<E: Debug> { /* fields omitted */ }

Accelerometer errors, generic around another error type E representing an (optional) cause of this error.

Methods

impl<E> Error<E> where
    E: Debug
[src]

pub fn new(kind: ErrorKind) -> Self[src]

Create a new error

pub fn new_with_cause(kind: ErrorKind, cause: E) -> Self[src]

Create a new error with a cause

pub fn kind(&self) -> ErrorKind[src]

Get the kind of error which occurred

pub fn cause(&self) -> Option<&E>[src]

Get the cause of the underlying error (if applicable)

pub fn into_cause(self) -> E[src]

Convert this error into its underlying cause.

Panics if the error does not have a cause.

Trait Implementations

impl<E: Debug + Debug> Debug for Error<E>[src]

impl<E> From<E> for Error<E> where
    E: Debug
[src]

fn from(cause: E) -> Error<E>[src]

Create a new error from a cause, e.g. I2C or SPI I/O error

impl<E: Clone + Debug> Clone for Error<E>[src]

default fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<E> Send for Error<E> where
    E: Send

impl<E> Sync for Error<E> where
    E: Sync

Blanket Implementations

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

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

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

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

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

impl<T> Same for T

type Output = T

Should always be Self