Enum ErrorKind

Source
pub enum ErrorKind {
Show 20 variants AssertFailure = 246, BadOpcode = 242, BadParam = 226, CommFail = 240, ConfigZoneLocked = 1, DataZoneLocked = 4, FuncFail = 224, InvalidId = 227, InvalidSize = 228, NotLocked = 248, ResyncWithWakeup = 232, RxCrcError = 229, RxFail = 230, SmallBuffer = 237, Timeout = 241, TooManyCommRetries = 236, TxFail = 247, Unimplemented = 245, UseFlagsConsumed = 252, WakeFailed = 208,
}
Expand description

A list of specific error causes. Each kind is converted into Error type.

Variants§

§

AssertFailure = 246

Code failed run-time consistency check

§

BadOpcode = 242

opcode is not supported by the device

§

BadParam = 226

bad argument (out of range, null pointer, etc.)

§

CommFail = 240

Communication with device failed. Same as in hardware dependent modules.

§

ConfigZoneLocked = 1

§

DataZoneLocked = 4

§

FuncFail = 224

Function could not execute due to incorrect condition / state.

§

InvalidId = 227

invalid device id, id not set

§

InvalidSize = 228

Count value is out of range or greater than buffer size.

§

NotLocked = 248

required zone was not locked

§

ResyncWithWakeup = 232

Re-synchronization succeeded, but only after generating a Wake-up

§

RxCrcError = 229

Crc error in data received from device

§

RxFail = 230

Timed out while waiting for response. Number of bytes received is > 0.

§

SmallBuffer = 237

Supplied buffer is too small for data required

§

Timeout = 241

Timed out while waiting for response. Number of bytes received is 0.

§

TooManyCommRetries = 236

Device did not respond too many times during a transmission. Could indicate no device present.

§

TxFail = 247

Failed to write

§

Unimplemented = 245

Function or some element of it hasn’t been implemented yet

§

UseFlagsConsumed = 252

Use flags on the device indicates its consumed fully

§

WakeFailed = 208

Device did not respond to wake call as expected

Trait Implementations§

Source§

impl Clone for ErrorKind

Source§

fn clone(&self) -> ErrorKind

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for ErrorKind

Source§

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

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

impl Display for ErrorKind

Source§

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

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

impl From<ErrorKind> for Error

Source§

fn from(kind: ErrorKind) -> Error

Converts to this type from the input type.
Source§

impl Copy for ErrorKind

Auto Trait Implementations§

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> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.