pub struct TemplateProcessor;Expand description
Template processor for command substitution
Implementations§
Source§impl TemplateProcessor
impl TemplateProcessor
Sourcepub fn process(
template: &str,
variables: &HashMap<String, String>,
) -> Result<String>
pub fn process( template: &str, variables: &HashMap<String, String>, ) -> Result<String>
Process a template string with variable substitution
Supports the following placeholder formats:
- {{variable}} - simple substitution
- {{variable:default}} - substitution with default value
Auto Trait Implementations§
impl Freeze for TemplateProcessor
impl RefUnwindSafe for TemplateProcessor
impl Send for TemplateProcessor
impl Sync for TemplateProcessor
impl Unpin for TemplateProcessor
impl UnwindSafe for TemplateProcessor
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