aboutsummaryrefslogtreecommitdiff
path: root/src/error.rs
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2023-11-26 18:45:59 +0100
committerDaniel Schadt <kingdread@gmx.de>2023-11-26 18:45:59 +0100
commitf2a90a51ce3045e676ba105caf96d5037e03d4b4 (patch)
treeb6e1cd8ccba7223e79283242c28ad50c904e23f2 /src/error.rs
downloadhohibe-f2a90a51ce3045e676ba105caf96d5037e03d4b4.tar.gz
hohibe-f2a90a51ce3045e676ba105caf96d5037e03d4b4.tar.bz2
hohibe-f2a90a51ce3045e676ba105caf96d5037e03d4b4.zip
initial commit
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs
new file mode 100644
index 0000000..155a388
--- /dev/null
+++ b/src/error.rs
@@ -0,0 +1,13 @@
+use thiserror::Error;
+
+#[derive(Debug, Error)]
+pub enum Error {
+ #[error("The supplied identity was too long")]
+ IdentityTooLong,
+ #[error("The supplied identity had no elements")]
+ EmptyIdentity,
+ #[error("The supplied ciphertext was malforemd")]
+ MalformedCiphertext,
+}
+
+pub type Result<V, E=Error> = std::result::Result<V, E>;