diff options
Diffstat (limited to 'crates/starship_cache/src/errors.rs')
-rw-r--r-- | crates/starship_cache/src/errors.rs | 20 |
1 files changed, 20 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..b2a8e7768 --- /dev/null +++ b/crates/starship_cache/src/errors.rs @@ -0,0 +1,20 @@ +use std::io; + +#[non_exhaustive] +#[derive(thiserror::Error, Debug)] +pub enum Error { + #[error("cannot open cache file")] + OpenFile(#[source] io::Error), + + #[error("cannot create cache dir")] + CreateCacheDir(#[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), +} |