pub struct TemplateEngine { /* private fields */ }Expand description
Handlebars-based template engine for QA specs.
Implementations§
Source§impl TemplateEngine
impl TemplateEngine
Sourcepub fn new(mode: ResolutionMode) -> Self
pub fn new(mode: ResolutionMode) -> Self
Construct a templating engine.
Sourcepub fn resolve_string(
&self,
template: &str,
ctx: &TemplateContext,
) -> Result<String, TemplateError>
pub fn resolve_string( &self, template: &str, ctx: &TemplateContext, ) -> Result<String, TemplateError>
Resolve a string field using the provided context.
Sourcepub fn resolve_form_spec(
&self,
spec: &FormSpec,
ctx: &TemplateContext,
) -> Result<FormSpec, TemplateError>
pub fn resolve_form_spec( &self, spec: &FormSpec, ctx: &TemplateContext, ) -> Result<FormSpec, TemplateError>
Resolve templated strings within a FormSpec.
Auto Trait Implementations§
impl Freeze for TemplateEngine
impl !RefUnwindSafe for TemplateEngine
impl Send for TemplateEngine
impl Sync for TemplateEngine
impl Unpin for TemplateEngine
impl UnsafeUnpin 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