1use std::path::PathBuf;
7
8#[derive(Debug, Default, Clone, Eq, PartialEq)]
10#[cfg_attr(
11 feature = "derive",
12 derive(serde::Serialize, serde::Deserialize),
13 serde(rename_all = "kebab-case")
14)]
15pub struct MaildirConfig {
16 pub root_dir: PathBuf,
23
24 #[cfg_attr(feature = "derive", serde(default))]
25 pub maildirpp: bool,
26}
27
28#[cfg(feature = "sync")]
29impl crate::sync::hash::SyncHash for MaildirConfig {
30 fn sync_hash(&self, state: &mut std::hash::DefaultHasher) {
31 std::hash::Hash::hash(&shellexpand_utils::shellexpand_path(&self.root_dir), state);
32 }
33}