[][src]Struct adxl355::Error

pub struct Error<E> where
    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) -> Error<E>[src]

Create a new error

pub fn new_with_cause(kind: ErrorKind, cause: E) -> Error<E>[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> Clone for Error<E> where
    E: Clone + Debug
[src]

impl<E> Debug for Error<E> where
    E: Debug
[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

Auto Trait Implementations

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

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

impl<E> Unpin for Error<E> where
    E: 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<!> for T[src]

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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.