diff options
| author | Naz <ndpm13@ch-naseem.com> | 2025-07-31 14:50:21 +0100 |
|---|---|---|
| committer | Naz <ndpm13@ch-naseem.com> | 2025-07-31 14:50:21 +0100 |
| commit | 61b6008db55f8aa6d9cc8d8998c3e28916e144cc (patch) | |
| tree | 64303da75bfb86162873377eb520b2513c72d7df /src/error.rs | |
| parent | 6b3f5d37fbce2e880a454e66d8fbd78269f1c867 (diff) | |
✨feat: add an error module
Diffstat (limited to 'src/error.rs')
| -rw-r--r-- | src/error.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs new file mode 100644 index 0000000..0183e38 --- /dev/null +++ b/src/error.rs @@ -0,0 +1,21 @@ +use derive_more::From; + +pub type Result<T> = core::result::Result<T, Error>; + +#[derive(Debug, From)] +pub enum Error { + InvalidPath, + NotFound(String), + + #[from] + Io(std::io::Error), + + #[from] + Json(serde_json::Error), + + #[from] + Http(reqwest::Error), + + #[from] + EnvVar(std::env::VarError), +} |
