1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#[derive(Debug)] pub enum Error { IOError(std::io::Error), OPSignInError(String), ItemQueryError(String), ItemDeserializeError(serde_json::error::Error), } impl From<std::io::Error> for Error { fn from(e: std::io::Error) -> Self { Self::IOError(e) } } impl From<serde_json::error::Error> for Error { fn from(e: serde_json::error::Error) -> Self { Self::ItemDeserializeError(e) } }