pub struct MailPaths {
pub notmuch: ResolvedConfig,
pub mbsync: ResolvedConfig,
pub msmtp: ResolvedConfig,
pub notmuch_config: NotmuchConfig,
pub mbsync_config: MbsyncConfig,
pub msmtp_config: MsmtpConfig,
pub maildir_root: PathBuf,
pub database_path: PathBuf,
pub binaries: Binaries,
pub ecr_config_dir: PathBuf,
}Fields§
§notmuch: ResolvedConfig§mbsync: ResolvedConfig§msmtp: ResolvedConfig§notmuch_config: NotmuchConfig§mbsync_config: MbsyncConfig§msmtp_config: MsmtpConfig§maildir_root: PathBuf§database_path: PathBuf§binaries: Binaries§ecr_config_dir: PathBufWhere ecr keeps its own files, as opposed to the mail tools’ files.
Implementations§
Source§impl MailPaths
impl MailPaths
pub fn discover() -> Result<Self>
pub fn with(env: &Env, settings: &ServerSettings) -> Result<Self>
Sourcepub fn settings_file(&self) -> PathBuf
pub fn settings_file(&self) -> PathBuf
The user-facing settings file, shared by every client.
Sourcepub fn themes_dir(&self) -> PathBuf
pub fn themes_dir(&self) -> PathBuf
Where the shipped presets are seeded and the user’s own themes live.
Sourcepub fn resolve_relative(&self, rel: &str) -> Result<PathBuf>
pub fn resolve_relative(&self, rel: &str) -> Result<PathBuf>
Resolves a path written in settings.toml against ecr’s own directory.
The link is user input that arrives over HTTP, so this is a boundary, not
a convenience: anything that could climb out of ecr_config_dir or name a
file ecr has no business reading is rejected rather than clamped. The
check is lexical because the target need not exist yet — a theme can be
pointed at before it is written.
pub fn xapian_dir(&self) -> PathBuf
pub fn post_new_hook(&self) -> Option<PathBuf>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MailPaths
impl RefUnwindSafe for MailPaths
impl Send for MailPaths
impl Sync for MailPaths
impl Unpin for MailPaths
impl UnsafeUnpin for MailPaths
impl UnwindSafe for MailPaths
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more