pub struct MailConfig { /* private fields */ }
Expand description
A struct representing a full mail configuration, required for working with this library
For convenience reasons, this implements Serialize and Deserialize, so it can be fetched from a configuration file for example
§TODO
Figure out how to use handlebars with variables on this. Right now the support for that is not implemented yet.
Implementations§
Source§impl MailConfig
impl MailConfig
pub fn default_account(&self) -> &String
pub fn accounts(&self) -> &Vec<MailAccountConfig>
pub fn account(&self, name: &str) -> Option<&MailAccountConfig>
pub fn fetchcommand(&self) -> &MailCommand
pub fn postfetchcommand(&self) -> Option<&MailCommand>
pub fn sendcommand(&self) -> &MailCommand
pub fn postsendcommand(&self) -> Option<&MailCommand>
pub fn fetchcommand_for_account(&self, account_name: &str) -> &MailCommand
pub fn postfetchcommand_for_account( &self, account_name: &str, ) -> Option<&MailCommand>
pub fn sendcommand_for_account(&self, account_name: &str) -> &MailCommand
pub fn postsendcommand_for_account( &self, account_name: &str, ) -> Option<&MailCommand>
Trait Implementations§
Source§impl Debug for MailConfig
impl Debug for MailConfig
Source§impl<'de> Deserialize<'de> for MailConfig
impl<'de> Deserialize<'de> for MailConfig
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for MailConfig
impl RefUnwindSafe for MailConfig
impl Send for MailConfig
impl Sync for MailConfig
impl Unpin for MailConfig
impl UnwindSafe for MailConfig
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more