Enum handlebars::template::TemplateElement
source · [−]pub enum TemplateElement {
RawString(String),
HtmlExpression(Box<HelperTemplate>),
Expression(Box<HelperTemplate>),
HelperBlock(Box<HelperTemplate>),
DecoratorExpression(Box<DecoratorTemplate>),
DecoratorBlock(Box<DecoratorTemplate>),
PartialExpression(Box<DecoratorTemplate>),
PartialBlock(Box<DecoratorTemplate>),
Comment(String),
}
Variants
RawString(String)
HtmlExpression(Box<HelperTemplate>)
Expression(Box<HelperTemplate>)
HelperBlock(Box<HelperTemplate>)
DecoratorExpression(Box<DecoratorTemplate>)
DecoratorBlock(Box<DecoratorTemplate>)
PartialExpression(Box<DecoratorTemplate>)
PartialBlock(Box<DecoratorTemplate>)
Comment(String)
Trait Implementations
fn eval<'reg: 'rc, 'rc>(
&'reg self,
registry: &'reg Registry<'reg>,
ctx: &'rc Context,
rc: &mut RenderContext<'reg, 'rc>
) -> Result<(), RenderError>
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
fn render<'reg: 'rc, 'rc>(
&'reg self,
registry: &'reg Registry<'reg>,
ctx: &'rc Context,
rc: &mut RenderContext<'reg, 'rc>,
out: &mut dyn Output
) -> Result<(), RenderError>
fn render<'reg: 'rc, 'rc>(
&'reg self,
registry: &'reg Registry<'reg>,
ctx: &'rc Context,
rc: &mut RenderContext<'reg, 'rc>,
out: &mut dyn Output
) -> Result<(), RenderError>
render into RenderContext’s writer
fn renders<'reg: 'rc, 'rc>(
&'reg self,
registry: &'reg Registry<'reg>,
ctx: &'rc Context,
rc: &mut RenderContext<'reg, 'rc>
) -> Result<String, RenderError>
fn renders<'reg: 'rc, 'rc>(
&'reg self,
registry: &'reg Registry<'reg>,
ctx: &'rc Context,
rc: &mut RenderContext<'reg, 'rc>
) -> Result<String, RenderError>
render into string
Auto Trait Implementations
impl RefUnwindSafe for TemplateElement
impl Send for TemplateElement
impl Sync for TemplateElement
impl Unpin for TemplateElement
impl UnwindSafe for TemplateElement
Blanket Implementations
Mutably borrows from an owned value. Read more