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