summaryrefslogtreecommitdiffstats
path: root/crates/starship-cache/src/errors.rs
blob: 248a3af3b1cf9675c15a7610e1a98177d46f9760 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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),
}