pub struct TemplateConfig {
pub message: String,
pub field_pools: BTreeMap<String, Vec<String>>,
}Expand description
Configuration for one message template used by LogGeneratorConfig::Template.
The message field may contain {placeholder} tokens that are resolved
using the corresponding value pool from field_pools.
§Example YAML
message: "Request from {ip} to {endpoint}"
field_pools:
ip:
- "10.0.0.1"
- "10.0.0.2"
endpoint:
- "/api"
- "/health"Fields§
§message: StringThe message template. Use {field_name} for dynamic placeholders.
field_pools: BTreeMap<String, Vec<String>>Maps placeholder names to their value pools.
Uses BTreeMap for deterministic iteration order, matching the
codebase convention for ordered maps.
Trait Implementations§
Source§impl Clone for TemplateConfig
impl Clone for TemplateConfig
Source§fn clone(&self) -> TemplateConfig
fn clone(&self) -> TemplateConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TemplateConfig
impl Debug for 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>,
Deserialize this value from the given Serde deserializer. Read more
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
Mutably borrows from an owned value. Read more