Initial commit

This commit is contained in:
Uber Veng
2026-03-14 03:14:59 +07:00
commit f958e704f6
14 changed files with 4477 additions and 0 deletions

19
src/error.rs Normal file
View File

@@ -0,0 +1,19 @@
use thiserror::Error;
#[derive(Error, Debug)]
pub enum AppError {
#[error("Network error: {0}")]
Network(#[from] reqwest::Error),
#[error("IO error: {0}")]
Io(#[from] std::io::Error),
#[error("JSON error: {0}")]
Json(#[from] serde_json::Error),
#[error("Configuration error: {0}")]
Config(String),
#[error("Child process error: {0}")]
Child(String),
#[error("Protocol error: {0}")]
Protocol(String),
}
pub type Result<T> = std::result::Result<T, AppError>;