Enum handlebars::template::TemplateElement
source · [−]pub enum TemplateElement {
RawString(String),
HTMLExpression(Parameter),
Expression(Box<HelperTemplate>),
HelperBlock(Box<HelperTemplate>),
DecoratorExpression(Box<DecoratorTemplate>),
DecoratorBlock(Box<DecoratorTemplate>),
PartialExpression(Box<DecoratorTemplate>),
PartialBlock(Box<DecoratorTemplate>),
Comment(String),
}
Variants
RawString(String)
HTMLExpression(Parameter)
Expression(Box<HelperTemplate>)
HelperBlock(Box<HelperTemplate>)
DecoratorExpression(Box<DecoratorTemplate>)
DecoratorBlock(Box<DecoratorTemplate>)
PartialExpression(Box<DecoratorTemplate>)
PartialBlock(Box<DecoratorTemplate>)
Comment(String)
Trait Implementations
sourceimpl Clone for TemplateElement
impl Clone for TemplateElement
sourcefn clone(&self) -> TemplateElement
fn clone(&self) -> TemplateElement
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for TemplateElement
impl Debug for TemplateElement
sourceimpl Evaluable for TemplateElement
impl Evaluable for TemplateElement
fn eval<'reg: 'rc, 'rc>(
&'reg self,
registry: &'reg Registry<'reg>,
ctx: &'rc Context,
rc: &mut RenderContext<'reg, 'rc>
) -> Result<(), RenderError>
sourceimpl PartialEq<TemplateElement> for TemplateElement
impl PartialEq<TemplateElement> for TemplateElement
sourcefn eq(&self, other: &TemplateElement) -> bool
fn eq(&self, other: &TemplateElement) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &TemplateElement) -> bool
fn ne(&self, other: &TemplateElement) -> bool
This method tests for !=
.
sourceimpl Renderable for TemplateElement
impl Renderable for TemplateElement
sourcefn 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
sourcefn 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
impl StructuralPartialEq for TemplateElement
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more