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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more