summaryrefslogtreecommitdiffstats
path: root/crates/starship-cache/src/errors.rs
diff options
context:
space:
mode:
authorMatan Kushner <hello@matchai.dev>2021-07-02 16:54:52 -0400
committerMatan Kushner <hello@matchai.dev>2021-07-02 16:54:52 -0400
commit8bb76e08eeacdbeb7b51a2aee1c7cc9dbfba2b81 (patch)
treeda1a891376d494c6a5b0f17caf3f50560c07f228 /crates/starship-cache/src/errors.rs
parenta123df24dcd4b360c71b92a661b8c405dcbcbd62 (diff)
Add binary cachingbinary-caching
Diffstat (limited to 'crates/starship-cache/src/errors.rs')
-rw-r--r--crates/starship-cache/src/errors.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/crates/starship-cache/src/errors.rs b/crates/starship-cache/src/errors.rs
new file mode 100644
index 000000000..248a3af3b
--- /dev/null
+++ b/crates/starship-cache/src/errors.rs
@@ -0,0 +1,17 @@
+use std::io;
+
+#[non_exhaustive]
+#[derive(thiserror::Error, Debug)]
+pub enum Error {
+ #[error("cannot open cache file")]
+ OpenFile(#[source] io::Error),
+
+ #[error("cannot write cache file")]
+ WriteFile(#[source] io::Error),
+
+ #[error("cannot read binary metadata")]
+ ReadMetadata(#[source] io::Error),
+
+ #[error("unable to serialize cache")]
+ SerializeCache(#[source] toml::ser::Error),
+}