[][src]Enum kekbit::core::ReadError

pub enum ReadError {
    Failed {
        bytes_read: u32,
    },
    Timeout {
        timeout: u64,
    },
    Closed {
        bytes_read: u32,
    },
    ChannelFull {
        bytes_read: u32,
    },
}

Read operation errors

Variants

Failed

Read operation had unexpectedly failed. Usually will happen when a channel was corrupted.

Fields of Failed

bytes_read: u32

The amount of bytes read before the error occurred.

Timeout

Writer timeout had been detected. While the writer may resume pushing data in to the channel, most likely he had abandoned the channel.

Fields of Timeout

timeout: u64

Last time stamp at which the channel was still considered valid.

Closed

Channel is closed no more data will be pushed into.

Fields of Closed

bytes_read: u32

The amount of bytes read before the channel close mark was reached.

ChannelFull

Channel full. There is no more space available in this channel.

Fields of ChannelFull

bytes_read: u32

The amount of bytes read before the end of channel was reached.

Methods

impl ReadError[src]

pub fn bytes_read(&self) -> u32[src]

Returns the number of valid bytes read before an error occurred.

Trait Implementations

impl Clone for ReadError[src]

impl Copy for ReadError[src]

impl Debug for ReadError[src]

impl Eq for ReadError[src]

impl Hash for ReadError[src]

impl Ord for ReadError[src]

impl PartialEq<ReadError> for ReadError[src]

impl PartialOrd<ReadError> for ReadError[src]

impl StructuralEq for ReadError[src]

impl StructuralPartialEq for ReadError[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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.