Enum flipdot_core::FrameError[][src]

#[non_exhaustive]pub enum FrameError {
    DataTooLong {
        max: u8,
        actual: usize,
    },
    Io {
        source: Error,
    },
    InvalidFrame {
        data: Vec<u8>,
    },
    FrameDataMismatch {
        data: Vec<u8>,
        expected: usize,
        actual: usize,
    },
    BadChecksum {
        data: Vec<u8>,
        expected: u8,
        actual: u8,
    },
}

Errors related to reading/writing Frames of data.

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.
DataTooLong

Data length exceeded the maximum of 255 bytes.

Fields of DataTooLong

max: u8

The maximum data length.

actual: usize

The actual length of the data that was provided.

Io

Failed reading/writing a Frame of data.

Fields of Io

source: Error

The underlying I/O error.

InvalidFrame

Failed to parse data into a Frame.

Fields of InvalidFrame

data: Vec<u8>

The invalid frame data.

FrameDataMismatch

Frame data didn’t match declared length.

Fields of FrameDataMismatch

data: Vec<u8>

The invalid frame data.

expected: usize

The expected data length.

actual: usize

The actual value of the data that was provided.

BadChecksum

Frame checksum didn’t match declared checksum.

Fields of BadChecksum

data: Vec<u8>

The invalid frame data.

expected: u8

The expected checksum.

actual: u8

The actual checksum of the data.

Trait Implementations

impl Debug for FrameError[src]

impl Display for FrameError[src]

impl Error for FrameError[src]

impl From<Error> for FrameError[src]

Auto Trait Implementations

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> ToString for T where
    T: Display + ?Sized
[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.