conf_override! wraps struct definitions and defines a secondary Override
struct that wraps each field in an Option. The macro mailbox_settings!
is used to select settings from an account & mailbox index. If a user defines an overriding setting, the macro returns the override instead of the immediately next in the hierarchy setting.
The selection is done for a specific field as follows:
if per-folder override is defined, return per-folder override
else if per-account override is defined, return per-account override
else return global setting field value.
/// Command to launch editor. Can have arguments. Draft filename is given as the last argument. If it's missing, the environment variable $EDITOR is looked up.
#[serde(default = "none")]
pubeditor_cmd: Option<String>,
/// Embed editor (for terminal interfaces) instead of forking and waiting.
#[serde(default = "false_val")]
pubembed: bool,
/// Set "format=flowed" in plain text attachments.
/// Default: true
#[serde(default = "true_val")]
pubformat_flowed: bool,
/// Set default header values for new drafts
/// Default: empty
#[serde(default)]
pubdefault_header_values: HashMap<String,String>,
}
override_def!(
ComposingSettingsOverride,
/// Settings for writing and sending new e-mail
#[derive(Debug, Serialize, Deserialize, Clone)]
pubstructComposingSettings{
/// A command to pipe new emails to
/// Required
#[serde(alias = "mailer-cmd")]
mailer_cmd: String,
/// Command to launch editor. Can have arguments. Draft filename is given as the last argument. If it's missing, the environment variable $EDITOR is looked up.
#[serde(default = "none", alias = "editor-cmd")]
editor_cmd: Option<String>,
/// Embed editor (for terminal interfaces) instead of forking and waiting.
#[serde(default = "false_val")]
embed: bool,
/// Set "format=flowed" in plain text attachments.
/// Default: true
#[serde(default = "true_val", alias = "format-flowed")]
format_flowed: bool,
/// Set default header values for new drafts
/// Default: empty
#[serde(default, alias = "default-header-values")]