diff options
Diffstat (limited to 'crates/starship-cache/src/errors.rs')
-rw-r--r-- | crates/starship-cache/src/errors.rs | 17 |
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), +} |