Skip to main content

Config

Struct Config 

Source
pub struct Config {
Show 129 fields pub fragment_prefix: String, pub htmlmessage_deleted: Option<String>, pub antispam_at: String, pub antispamdomain: Option<String>, pub language: String, pub htmlsuffix: String, pub mbox: Option<String>, pub archives: Option<String>, pub custom_archives: Option<String>, pub about: Option<String>, pub label: Option<String>, pub dir: Option<String>, pub defaultindex: String, pub default_top_index: String, pub mailcommand: String, pub newmsg_command: String, pub replymsg_command: String, pub inreplyto_command: Option<String>, pub mailto: Option<String>, pub hmail: Option<String>, pub domainaddr: Option<String>, pub css: Option<String>, pub icss_url: Option<String>, pub mcss_url: Option<String>, pub dateformat: Option<String>, pub indexdateformat: Option<String>, pub stripsubject: Option<String>, pub link_to_replies: Option<String>, pub quote_link_string: Option<String>, pub ihtmlheader: Option<String>, pub ihtmlfooter: Option<String>, pub ihtmlhead: Option<String>, pub ihtmlhelpup: Option<String>, pub ihtmlhelplow: Option<String>, pub ihtmlnavbar2up: Option<String>, pub mhtmlheader: Option<String>, pub mhtmlfooter: Option<String>, pub attachmentlink: Option<String>, pub bodyheader: Option<String>, pub bodyheaderend: Option<String>, pub bodyfooter: Option<String>, pub unsafe_chars: Option<String>, pub filename_base: Option<String>, pub folder_by_date: Option<String>, pub latest_folder: Option<String>, pub base_url: Option<String>, pub describe_folder: Option<String>, pub delete_older: Option<String>, pub delete_newer: Option<String>, pub alts_text: Option<String>, pub description: Option<String>, pub theme: Option<String>, pub append_filename: Option<String>, pub txtsuffix: Option<String>, pub email_address_obfuscation: bool, pub i18n: bool, pub i18n_body: bool, pub overwrite: bool, pub inlinehtml: bool, pub readone: bool, pub reverse: bool, pub reverse_folders: bool, pub showheaders: bool, pub showbr: bool, pub showreplies: bool, pub indextable: bool, pub iquotes: bool, pub eurodate: bool, pub gmtime: bool, pub isodate: bool, pub require_msgids: bool, pub discard_dup_msgids: bool, pub usemeta: bool, pub uselock: bool, pub ietf_mbox: bool, pub linkquotes: bool, pub monthly_index: bool, pub yearly_index: bool, pub spamprotect: bool, pub spamprotect_id: bool, pub attachmentsindex: bool, pub usegdbm: bool, pub writehaof: bool, pub append: bool, pub nonsequential: bool, pub warn_surpressions: bool, pub files_by_thread: bool, pub href_detection: bool, pub mbox_shortened: bool, pub report_new_file: bool, pub report_new_folder: bool, pub use_sender_date: bool, pub inline_addlink: bool, pub iso2022jp: bool, pub delete_incremental: bool, pub showgenerator: bool, pub show_warnings: bool, pub increment: i32, pub showhtml: i32, pub show_msg_links: i32, pub show_index_links: i32, pub thrdlevels: i32, pub dirmode: i32, pub filemode: i32, pub locktime: i32, pub searchbackmsgnum: i32, pub quote_hide_threshold: i32, pub thread_file_depth: i32, pub startmsgnum: i32, pub msgsperfolder: i32, pub save_alts: i32, pub delete_level: i32, pub progress: i32, pub max_message_size: usize, pub show_headers: HmList, pub avoid_indices: HmList, pub avoid_top_indices: HmList, pub skip_headers: HmList, pub text_types: HmList, pub inline_types: HmList, pub prefered_types: HmList, pub ignore_types: HmList, pub filter_out: HmList, pub filter_require: HmList, pub filter_out_full_body: HmList, pub filter_require_full_body: HmList, pub deleted: HmList, pub expires: HmList, pub delete_msgnum: HmList,
}
Expand description

Complete runtime configuration for a hypermail archive run.

Controls input/output paths, HTML generation options, index types, spam protection, i18n, MIME handling, and template customization.

Fields§

§fragment_prefix: String§htmlmessage_deleted: Option<String>§antispam_at: String§antispamdomain: Option<String>§language: String§htmlsuffix: String§mbox: Option<String>§archives: Option<String>§custom_archives: Option<String>§about: Option<String>§label: Option<String>§dir: Option<String>§defaultindex: String§default_top_index: String§mailcommand: String§newmsg_command: String§replymsg_command: String§inreplyto_command: Option<String>§mailto: Option<String>§hmail: Option<String>§domainaddr: Option<String>§css: Option<String>§icss_url: Option<String>§mcss_url: Option<String>§dateformat: Option<String>§indexdateformat: Option<String>§stripsubject: Option<String>§link_to_replies: Option<String>§quote_link_string: Option<String>§ihtmlheader: Option<String>§ihtmlfooter: Option<String>§ihtmlhead: Option<String>§ihtmlhelpup: Option<String>§ihtmlhelplow: Option<String>§ihtmlnavbar2up: Option<String>§mhtmlheader: Option<String>§mhtmlfooter: Option<String>§attachmentlink: Option<String>§bodyheader: Option<String>§bodyheaderend: Option<String>§bodyfooter: Option<String>§unsafe_chars: Option<String>§filename_base: Option<String>§folder_by_date: Option<String>§latest_folder: Option<String>§base_url: Option<String>§describe_folder: Option<String>§delete_older: Option<String>§delete_newer: Option<String>§alts_text: Option<String>§description: Option<String>§theme: Option<String>§append_filename: Option<String>§txtsuffix: Option<String>§email_address_obfuscation: bool§i18n: bool§i18n_body: bool§overwrite: bool§inlinehtml: bool§readone: bool§reverse: bool§reverse_folders: bool§showheaders: bool§showbr: bool§showreplies: bool§indextable: bool§iquotes: bool§eurodate: bool§gmtime: bool§isodate: bool§require_msgids: bool§discard_dup_msgids: bool§usemeta: bool§uselock: bool§ietf_mbox: bool§linkquotes: bool§monthly_index: bool§yearly_index: bool§spamprotect: bool§spamprotect_id: bool§attachmentsindex: bool§usegdbm: bool§writehaof: bool§append: bool§nonsequential: bool§warn_surpressions: bool§files_by_thread: bool§href_detection: bool§mbox_shortened: bool§report_new_file: bool§report_new_folder: bool§use_sender_date: bool§inline_addlink: bool§iso2022jp: bool§delete_incremental: bool§showgenerator: bool§show_warnings: bool§increment: i32§showhtml: i32§show_msg_links: i32§show_index_links: i32§thrdlevels: i32§dirmode: i32§filemode: i32§locktime: i32§searchbackmsgnum: i32§quote_hide_threshold: i32§thread_file_depth: i32§startmsgnum: i32§msgsperfolder: i32§save_alts: i32§delete_level: i32§progress: i32§max_message_size: usize§show_headers: HmList§avoid_indices: HmList§avoid_top_indices: HmList§skip_headers: HmList§text_types: HmList§inline_types: HmList§prefered_types: HmList§ignore_types: HmList§filter_out: HmList§filter_require: HmList§filter_out_full_body: HmList§filter_require_full_body: HmList§deleted: HmList§expires: HmList§delete_msgnum: HmList

Implementations§

Source§

impl Config

Source

pub fn set_string(&mut self, key: &str, val: &str) -> Result<()>

Sets a string configuration value by key name.

Source

pub fn set_switch(&mut self, key: &str, val: bool) -> Result<()>

Sets a boolean switch configuration value by key name.

Source

pub fn set_integer(&mut self, key: &str, val: i64) -> Result<()>

Sets an integer configuration value by key name.

Source

pub fn set_list(&mut self, key: &str, val: &str) -> Result<()>

Appends whitespace-separated values to a list configuration by key name.

Source

pub fn apply_cli_arg(&mut self, key: &str, val: &str) -> Result<()>

Applies a CLI argument, auto-detecting the value type (bool/int/string/list).

Supports key=value syntax, hm_ and set_ prefixes, and ON/OFF/YES/NO values.

Source

pub fn load_env(&mut self)

Loads configuration from environment variables prefixed with HM_.

Source

pub fn post_process(&mut self)

Applies post-processing defaults (e.g., always-skipped headers).

Source

pub fn css_path(&self) -> String

Returns the resolved CSS path, joining with dir if relative.

Trait Implementations§

Source§

impl Clone for Config

Source§

fn clone(&self) -> Config

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Config

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Config

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.