Enum diffusion::Error [] [src]

pub enum Error {
    CorruptSegmentHeader,
    CorruptMsgHeader,
    InsufficientLength(usize),
    IoError(ErrorKind),
}

represents errors that can be encountered during the usage of of reader and writer.

Variants

CorruptSegmentHeader

indicates corruption when initializing the reader. This can only happens in a file.

CorruptMsgHeader

indicates corruption when reading a message. This can only happens in a file.

InsufficientLength

indicates possibily a curruption. usize means the number of bytes it need in addition to what is already in there. This can only happens in a file.

IoError

indicates there is an IO error happening during reading or writing. This can happen in all transport types.

Trait Implementations

impl Display for Error

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

impl Error for Error

fn description(&self) -> &str

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

impl From<Error> for Error

fn from(err: Error) -> Error

Derived Implementations

impl Eq for Error

impl PartialEq for Error

fn eq(&self, __arg_0: &Error) -> bool

fn ne(&self, __arg_0: &Error) -> bool

impl Debug for Error

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

impl Clone for Error

fn clone(&self) -> Error

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

impl Copy for Error