Enum evegfx::CoprocessorError[][src]

#[non_exhaustive]pub enum CoprocessorError<M, I, W> where
    M: Model,
    I: Interface,
    W: Waiter<M, I>, 
{ Unsupported, Interface(I::Error), Waiter(W::Error), Fault, }

Error type for coprocessor operations.

This distinguishes between errors from the underlying interface to the hardware, errors returned by the "waiter" while waiting for more buffer space, and coprocessor faults reported by the EVE chip itself.

Variants (Non-exhaustive)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Unsupported

Indicates that the requested operation isn't supported for the current model.

The crate API is designed to handle certain model differences at compile time within the type system, but for reasons of pragmatism some differences are handled only dynamically.

Interface(I::Error)

Errors encountered when sending or recieving data from the EVE chip.

The wrapped error type for this variant is the error type for whichever Interface implementation you are using.

Waiter(W::Error)

Errors encountered while waiting for more space in the ring buffer.

The wrapped error type for this variant is the error type for whichever Waiter implementation you are using. If you are using the default polling waiter then the error will be of the error type associated with your chosen Interface.

Fault

Indicates that the coprocessor itself reported a fault.

If you are using an EVE chip that supports fault messages, you can call Coprocessor::coprocessor_fault_msg to get an error string from the EVE chip.

The coprocessor typically runs asynchronously from the host processor, and so a fault error may be returned from some later method call than the one which caused the fault. This error variant therefore indicates only that the coprocessor is blocked by being the fault state, not that the most recent method call put it in that state.

Implementations

impl<M, I, W> CoprocessorError<M, I, W> where
    M: Model,
    I: Interface,
    W: Waiter<M, I>, 
[src]

pub fn from_general_error(err: Error<I>) -> Self[src]

pub fn general_result<R>(r: Result<R, Error<I>>) -> Result<R, Self>[src]

Trait Implementations

impl<M, I, W> Debug for CoprocessorError<M, I, W> where
    M: Model,
    I: Interface,
    W: Waiter<M, I>,
    I::Error: Debug,
    W::Error: Debug
[src]

impl<M, I, W> From<Error<I>> for CoprocessorError<M, I, W> where
    M: Model,
    I: Interface,
    W: Waiter<M, I>, 
[src]

Auto Trait Implementations

impl<M, I, W> Send for CoprocessorError<M, I, W> where
    <I as Interface>::Error: Send,
    <W as Waiter<M, I>>::Error: Send
[src]

impl<M, I, W> Sync for CoprocessorError<M, I, W> where
    <I as Interface>::Error: Sync,
    <W as Waiter<M, I>>::Error: Sync
[src]

impl<M, I, W> Unpin for CoprocessorError<M, I, W> where
    <I as Interface>::Error: Unpin,
    <W as Waiter<M, I>>::Error: Unpin
[src]

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<T> for T[src]

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

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.