Enum bytekey::Error [−] [src]

pub enum Error {
    NotUtf8,
    UnexpectedEof,
    Io(Error),
}

An error type for bytekey decoding and encoding.

This is a thin wrapper over the standard io::Error type. Namely, it adds two additional error cases: an unexpected EOF, and invalid utf8.

Variants

NotUtf8

Variant representing that the underlying stream was read successfully but it did not contain valid utf8 data.

UnexpectedEof

Variant representing that the underlying stream returns less bytes, than are required to decode a meaningful value.

Io

Variant representing that an I/O error occurred.

Trait Implementations

impl From<Error> for Error

fn from(error: Error) -> Error

impl From<CharsError> for Error

fn from(error: CharsError) -> Error

impl From<Error> for Error

fn from(error: Error) -> Error

impl Display for Error

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

impl Error for Error

fn description(&self) -> &str

fn cause(&self) -> Option<&Error>

Derived Implementations

impl Debug for Error

fn fmt(&self, __arg_0: &mut Formatter) -> Result