pub struct Config {
pub vault: String,
pub file_path_format: String,
pub section_header: String,
pub list_type: ListType,
pub template_path: Option<String>,
pub locale: Option<String>,
pub time_format: TimeFormat,
pub time_label: String,
pub event_label: String,
pub category_headers: HashMap<String, String>,
pub phrases: HashMap<String, String>,
}Fields§
§vault: String§file_path_format: String§section_header: String§list_type: ListType§template_path: Option<String>§locale: Option<String>§time_format: TimeFormat§time_label: String§event_label: String§category_headers: HashMap<String, String>§phrases: HashMap<String, String>Implementations§
Source§impl Config
impl Config
Sourcepub fn get_conjunction(&self) -> &'static str
pub fn get_conjunction(&self) -> &'static str
Get the conjunction word based on the configured locale
Source§impl Config
impl Config
pub fn with_list_type(&self, list_type: ListType) -> Self
pub fn with_time_format(&self, time_format: TimeFormat) -> Self
Sourcepub fn get_section_header_for_category(&self, category: Option<&str>) -> &str
pub fn get_section_header_for_category(&self, category: Option<&str>) -> &str
Get the section header for a specific category Returns the default section_header if no category-specific header is found
pub fn initialize() -> Config
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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 Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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