pub struct TemplateEngine { /* private fields */ }Expand description
Template engine for ADR generation.
Implementations§
Source§impl TemplateEngine
impl TemplateEngine
Sourcepub fn render(
&self,
template: &str,
context: &HashMap<String, String>,
) -> Result<String, Error>
pub fn render( &self, template: &str, context: &HashMap<String, String>, ) -> Result<String, Error>
Sourcepub fn list_templates(&self) -> Vec<String>
pub fn list_templates(&self) -> Vec<String>
List available templates.
Sourcepub fn has_template(&self, name: &str) -> bool
pub fn has_template(&self, name: &str) -> bool
Check if a template exists.
Trait Implementations§
Source§impl Debug for TemplateEngine
impl Debug for TemplateEngine
Auto Trait Implementations§
impl Freeze for TemplateEngine
impl !RefUnwindSafe for TemplateEngine
impl Send for TemplateEngine
impl Sync for TemplateEngine
impl Unpin for TemplateEngine
impl !UnwindSafe for TemplateEngine
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