1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
use std::result;
use std::string::FromUtf8Error;

#[derive(Debug)]
pub enum Error {
    EndOfData,
    StringParseError,
}

impl From<FromUtf8Error> for Error {
    fn from(_error: FromUtf8Error) -> Self {
        Error::StringParseError
    }
}

pub type Result<T> = result::Result<T, Error>;