1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::error;
use std::fmt;

// struct
#[derive(Debug, Clone)]
pub struct DeserializeError;

//impl
impl fmt::Display for DeserializeError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "Unable to deserialize.")
    }
}
impl error::Error for DeserializeError {}