Struct vomit_config::Account

source ·
pub struct Account<'a> { /* private fields */ }
Expand description

Represents the configuration of a specific account

Implementations§

source§

impl Account<'_>

source

pub fn name(&self) -> &String

The name of the account

source

pub fn maildir(&self) -> &str

The directory where mail is stored locally in maildir format

source

pub fn remote(&self) -> Option<&str>

The remote IMAP server

source

pub fn user(&self) -> Option<&str>

The user name to log in to the remote server

source

pub fn send_user(&self) -> Option<&str>

The user name to log in when sending mail

If not explicitly configured, this returns the value of user().

source

pub fn send_remote(&self) -> Option<&str>

The remote SMTP server

If not explicitly configured, this returns the value of remote().

source

pub fn password(&self) -> Result<Option<String>, ConfigError>

The password to log in to the remote server

Potentially executes a configured command to retrieve the password. Returns an error if the password command has to be executed and fails. Can return Ok(None) if neither a password nor a password command are configured. Otherwise, returns the password.

source

pub fn send_password(&self) -> Result<Option<String>, ConfigError>

The password to log in to the remote server for sending mail

Potentially executes a configured command to retrieve the password. Returns an error if the password command has to be executed and fails. Can return Ok(None) if neither a password nor a password command are configured. Otherwise, returns the password.

Unless explicitly configured by the user, this returns the value of password().

Auto Trait Implementations§

§

impl<'a> RefUnwindSafe for Account<'a>

§

impl<'a> Send for Account<'a>

§

impl<'a> Sync for Account<'a>

§

impl<'a> Unpin for Account<'a>

§

impl<'a> UnwindSafe for Account<'a>

Blanket Implementations§

source§

impl<T> Any for Twhere
    T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere
    T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere
    T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere
    U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere
    U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere
    U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.