pub struct PreprocessorTemplateSection {
pub extensions: Vec<String>,
pub vars: HashMap<String, String>,
}Expand description
Template preprocessor settings.
Fields§
§extensions: Vec<String>File extensions that trigger template rendering. Each extension
is matched as a suffix (e.g. "tmpl" matches config.toml.tmpl).
vars: HashMap<String, String>User-defined variables, accessible as bare names in templates
(e.g. name = "Alice" makes {{ name }} render as Alice).
Reserved: dodot and env are built-in namespaces; using them
as var names raises an error at load time.
Trait Implementations§
Source§impl Clone for PreprocessorTemplateSection
impl Clone for PreprocessorTemplateSection
Source§fn clone(&self) -> PreprocessorTemplateSection
fn clone(&self) -> PreprocessorTemplateSection
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Config for PreprocessorTemplateSection
impl Config for PreprocessorTemplateSection
Source§type Layer = PreprocessorTemplateSectionLayer
type Layer = PreprocessorTemplateSectionLayer
A layer of
Self (a potentially partial configuration). Read moreSource§fn from_layer(layer: Self::Layer) -> Result<Self, Error>
fn from_layer(layer: Self::Layer) -> Result<Self, Error>
Tries to create
Self from a layer and validates itself. Read moreSource§fn builder() -> Builder<Self>
fn builder() -> Builder<Self>
Convenience builder to configure, load and merge multiple configuration
sources. Sources specified earlier have a higher priority; later
sources only fill in the gaps. After all sources have been loaded, the
default values (usually specified with
#[default = ...]) are merged
(with the lowest priority). Read moreSource§impl Debug for PreprocessorTemplateSection
impl Debug for PreprocessorTemplateSection
Source§impl<'de> Deserialize<'de> for PreprocessorTemplateSection
impl<'de> Deserialize<'de> for PreprocessorTemplateSection
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 PreprocessorTemplateSection
impl RefUnwindSafe for PreprocessorTemplateSection
impl Send for PreprocessorTemplateSection
impl Sync for PreprocessorTemplateSection
impl Unpin for PreprocessorTemplateSection
impl UnsafeUnpin for PreprocessorTemplateSection
impl UnwindSafe for PreprocessorTemplateSection
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