pub struct TemplateConfig {
pub names: NameTemplateConfig,
pub descriptions: DescriptionTemplateConfig,
pub references: ReferenceTemplateConfig,
pub path: Option<PathBuf>,
pub merge_strategy: TemplateMergeStrategy,
}Expand description
Template configuration for realistic data generation.
§User-supplied template packs (v3.2.0+)
Set path to a directory (or single YAML/JSON file) to override or
extend the embedded default pools for vendor names, customer names,
material/asset descriptions, audit findings, bank names, and
department names. When path is None (the default), generators
use the compiled-in pools and output is byte-identical to v3.1.2.
See crates/datasynth-core/src/templates/loader.rs::TemplateData
for the full YAML schema. Use datasynth-data templates export to
dump the defaults as a starter pack.
Fields§
§names: NameTemplateConfigName generation settings
descriptions: DescriptionTemplateConfigDescription generation settings
references: ReferenceTemplateConfigReference number settings
path: Option<PathBuf>Optional path to a user-supplied template file or directory.
When set, entries from the file(s) augment or replace the
embedded defaults according to merge_strategy.
None (default) = use embedded pools only (byte-identical to v3.1.2).
merge_strategy: TemplateMergeStrategyHow file-based entries combine with embedded defaults.
extend(default): append file entries to embedded pools, de-duplicating. Safe for incremental overlays.replace: discard embedded pools entirely and use only file entries. Requires a fully-populated template file.merge_prefer_file: replace individual categories when present in the file; keep embedded for absent categories.
Trait Implementations§
Source§impl Clone for TemplateConfig
impl Clone for TemplateConfig
Source§fn clone(&self) -> TemplateConfig
fn clone(&self) -> TemplateConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TemplateConfig
impl Debug for TemplateConfig
Source§impl Default for TemplateConfig
impl Default for TemplateConfig
Source§fn default() -> TemplateConfig
fn default() -> TemplateConfig
Source§impl<'de> Deserialize<'de> for TemplateConfig
impl<'de> Deserialize<'de> for TemplateConfig
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>,
Auto Trait Implementations§
impl Freeze for TemplateConfig
impl RefUnwindSafe for TemplateConfig
impl Send for TemplateConfig
impl Sync for TemplateConfig
impl Unpin for TemplateConfig
impl UnsafeUnpin for TemplateConfig
impl UnwindSafe for TemplateConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.