Enum whiteread::white::Error [] [src]

pub enum Error {
    TooShort,
    Leftovers,
    ParseError,
    IoError(Error),
}

Error which can occur while parsing White object.

It's convertible into io::Error, so it composes well with other reading functions.

Examples

if let Err(TooShort) = parse_string::<(u8, u16)>("1") {} else { panic!(); }
if let Err(Leftovers) = parse_string::<char>("x y z") {} else { panic!(); }
if let Err(ParseError) = parse_string::<i32>("seven") {} else { panic!(); }

Variants

There was not enough input to parse a value.

Excessive input was provided.

Parse error occured (data was in invalid format).

IO Error occured.

Methods

impl Error
[src]

Trait Implementations

impl Debug for Error
[src]

Formats the value using the given formatter.

impl From<Error> for Error
[src]

Performs the conversion.

impl Error for Error
[src]

A short description of the error. Read more

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

impl Display for Error
[src]

Formats the value using the given formatter. Read more