use thiserror::Error;
#[derive(Debug, Error)]
pub enum FtpError {
#[error("I/O error: {0}")]
Io(#[from] std::io::Error),
#[error("serialization error: {0}")]
SerializationJson(#[from] serde_json::Error),
#[error("YAML error: {0}")]
SerializationYaml(#[from] serde_yaml::Error),
#[error("template error: {0}")]
Template(#[from] handlebars::RenderError),
#[error("FTP server error: {0}")]
Server(#[from] libunftp::ServerError),
#[error("VFS error: {0}")]
Vfs(String),
#[error("validation error: {0}")]
Validation(String),
#[error("{0}")]
Internal(String),
}
pub type Result<T> = std::result::Result<T, FtpError>;