Skip to main content

caldir_core/calendar/config/
error.rs

1use std::path::PathBuf;
2
3#[derive(Debug, thiserror::Error)]
4#[non_exhaustive]
5pub enum CalendarConfigError {
6    #[error("failed to read calendar config {0}")]
7    Read(PathBuf, #[source] std::io::Error),
8
9    #[error("failed to write calendar config {0}")]
10    Write(PathBuf, #[source] std::io::Error),
11
12    #[error("invalid config in TOML file {0}")]
13    Deserialize(PathBuf, #[source] toml::de::Error),
14
15    #[error("invalid TOML syntax in config file {0}")]
16    Parse(PathBuf, #[source] toml_edit::TomlError),
17
18    #[error("failed to serialize calendar config")]
19    Serialize(#[source] toml::ser::Error),
20
21    #[error(transparent)]
22    Io(#[from] std::io::Error),
23}