Enum xdr_codec::Error [] [src]

pub enum Error {
    IOError(Error),
    InvalidUtf8(FromUtf8Error),
    InvalidCase,
    InvalidEnum,
    InvalidLen,
    Generic(String),
}

XDR errors

This simply amalgamates the various errors which can arise.

Variants

IOError(Error)

An underlying IO error.

InvalidUtf8(FromUtf8Error)

An improperly encoded String.

InvalidCase

Encoding discriminated union with a bad (default) case.

InvalidEnum

Decoding a bad enum value

InvalidLen

Array/String too long

Generic(String)

Generic error.

Methods

impl Error
[src]

fn invalidcase() -> Error

fn invalidenum() -> Error

fn invalidlen() -> Error

fn badutf8(err: FromUtf8Error) -> Error

fn generic<T>(err: T) -> Error where T: Display + Error

Trait Implementations

impl Debug for Error
[src]

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

Formats the value using the given formatter.

impl From<String> for Error
[src]

fn from(str: String) -> Self

Performs the conversion.

impl From<Error> for Error
[src]

fn from(err: Error) -> Self

Performs the conversion.

impl<'a> From<&'a str> for Error
[src]

fn from(err: &'a str) -> Self

Performs the conversion.

impl From<FromUtf8Error> for Error
[src]

fn from(err: FromUtf8Error) -> Self

Performs the conversion.

impl Send for Error
[src]

impl Sync for Error
[src]

impl Error for Error
[src]

fn description(&self) -> &str

A short description of the error. Read more

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

The lower-level cause of this error, if any. Read more

impl Display for Error
[src]

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

Formats the value using the given formatter.