From b4f59c226c6916a3e45f1a52dc6a9b15c800297a Mon Sep 17 00:00:00 2001 From: fx Date: Wed, 18 Oct 2023 15:11:44 +0200 Subject: basic cli, only start and get device --- src/error.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/error.rs (limited to 'src/error.rs') diff --git a/src/error.rs b/src/error.rs new file mode 100644 index 0000000..9aa8c08 --- /dev/null +++ b/src/error.rs @@ -0,0 +1,19 @@ +use std::fmt::Debug; + +pub enum CliError { + Reqwest(reqwest::Error), + Config(config::ConfigError), + Serde(serde_json::Error), + // Cli(Box), +} + +impl Debug for CliError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Reqwest(err) => { err.fmt(f) }, + Self::Config(err) => { err.fmt(f) }, + Self::Serde(err) => { err.fmt(f) }, + // Self::Cli(err) => {err.fmt(f)}, + } + } +} -- cgit v1.2.3