//! Sync error types. #[derive(Debug, thiserror::Error)] pub enum SyncError { #[error("database error: {0}")] Db(#[from] rusqlite::Error), #[error("sync client error: {0}")] Client(String), #[error("auth error: {0}")] Auth(String), #[error("I/O error: {0}")] Io(#[from] std::io::Error), #[error("{0}")] Other(String), } impl From for SyncError { fn from(e: synckit_client::SyncKitError) -> Self { SyncError::Client(e.to_string()) } } pub type Result = std::result::Result;