Struct email::notmuch::config::NotmuchConfig
source · pub struct NotmuchConfig {
pub database_path: Option<PathBuf>,
pub maildir_path: Option<PathBuf>,
pub config_path: Option<PathBuf>,
pub profile: Option<String>,
}
Expand description
The Notmuch backend config.
Fields§
§database_path: Option<PathBuf>
The path to the Notmuch database.
The path should point to the root directory containing the
Notmuch database (usually the root Maildir directory). Path is
shell-expanded, which means environment variables and tilde
~
are replaced by their values.
maildir_path: Option<PathBuf>
Override the default path to the Maildir folder.
Path is shell-expanded, which means environment variables and
tilde ~
are replaced by their values. Defaults to
database_path
if omitted.
config_path: Option<PathBuf>
Override the default Notmuch configuration file path.
Path is shell-expanded, which means environment variables and
tilde ~
are replaced by their values.
profile: Option<String>
Override the default Notmuch profile name.
Implementations§
source§impl NotmuchConfig
impl NotmuchConfig
sourcepub fn get_default_database_path() -> Result<PathBuf>
pub fn get_default_database_path() -> Result<PathBuf>
Get the default Notmuch database path.
sourcepub fn try_get_database_path(&self) -> Result<PathBuf>
pub fn try_get_database_path(&self) -> Result<PathBuf>
Try to get the reference to the Notmuch database path.
sourcepub fn try_get_maildir_path(&self) -> Result<PathBuf>
pub fn try_get_maildir_path(&self) -> Result<PathBuf>
Try to get the reference to the Maildir path.
Tries maildir_path
first, otherwise falls back to
database_path
.
sourcepub fn find_config_path(&self) -> Option<&Path>
pub fn find_config_path(&self) -> Option<&Path>
Find the Notmuch configuration path reference.
sourcepub fn find_profile(&self) -> Option<&str>
pub fn find_profile(&self) -> Option<&str>
Find the Notmuch profile.
Trait Implementations§
source§impl Clone for NotmuchConfig
impl Clone for NotmuchConfig
source§fn clone(&self) -> NotmuchConfig
fn clone(&self) -> NotmuchConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for NotmuchConfig
impl Debug for NotmuchConfig
source§impl Default for NotmuchConfig
impl Default for NotmuchConfig
source§fn default() -> NotmuchConfig
fn default() -> NotmuchConfig
source§impl<'de> Deserialize<'de> for NotmuchConfig
impl<'de> Deserialize<'de> for NotmuchConfig
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl PartialEq for NotmuchConfig
impl PartialEq for NotmuchConfig
source§fn eq(&self, other: &NotmuchConfig) -> bool
fn eq(&self, other: &NotmuchConfig) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for NotmuchConfig
impl Serialize for NotmuchConfig
impl Eq for NotmuchConfig
impl StructuralPartialEq for NotmuchConfig
Auto Trait Implementations§
impl Freeze for NotmuchConfig
impl RefUnwindSafe for NotmuchConfig
impl Send for NotmuchConfig
impl Sync for NotmuchConfig
impl Unpin for NotmuchConfig
impl UnwindSafe for NotmuchConfig
Blanket Implementations§
source§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
source§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
source§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
source§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
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
source§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
source§impl<T> ConvUtil for T
impl<T> ConvUtil for T
source§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
source§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.