use async_std::io;
#[derive(thiserror::Error, Debug)]
pub enum Error {
#[error("client error: {0}")]
Client(&'static str),
#[error("io error: {0}")]
Io(#[from] io::Error),
#[error("serialization error: {0}")]
JsonSerialization(#[from] serde_json::Error),
}
impl From<&'static str> for Error {
fn from(string: &'static str) -> Error {
Error::Client(string)
}
}
pub type FileResult = Result<(), Error>;