#[non_exhaustive]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 (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future 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§
Source§impl Clone for TemplateElement
impl Clone for TemplateElement
Source§fn clone(&self) -> TemplateElement
fn clone(&self) -> TemplateElement
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for TemplateElement
impl Debug for TemplateElement
Source§impl Evaluable for TemplateElement
impl Evaluable for TemplateElement
fn eval<'reg: 'rc, 'rc>( &'rc self, registry: &'reg Registry<'reg>, ctx: &'rc Context, rc: &mut RenderContext<'reg, 'rc>, ) -> Result<(), RenderError>
Source§impl PartialEq for TemplateElement
impl PartialEq for TemplateElement
Source§impl Renderable for TemplateElement
impl Renderable for TemplateElement
Source§fn render<'reg: 'rc, 'rc>(
&'rc self,
registry: &'reg Registry<'reg>,
ctx: &'rc Context,
rc: &mut RenderContext<'reg, 'rc>,
out: &mut dyn Output,
) -> Result<(), RenderError>
fn render<'reg: 'rc, 'rc>( &'rc self, registry: &'reg Registry<'reg>, ctx: &'rc Context, rc: &mut RenderContext<'reg, 'rc>, out: &mut dyn Output, ) -> Result<(), RenderError>
render into
RenderContext
’s writer
Source§fn renders<'reg: 'rc, 'rc>(
&'rc self,
registry: &'reg Registry<'reg>,
ctx: &'rc Context,
rc: &mut RenderContext<'reg, 'rc>,
) -> Result<String, RenderError>
fn renders<'reg: 'rc, 'rc>( &'rc self, registry: &'reg Registry<'reg>, ctx: &'rc Context, rc: &mut RenderContext<'reg, 'rc>, ) -> Result<String, RenderError>
render into string
impl Eq for TemplateElement
impl StructuralPartialEq for TemplateElement
Auto Trait Implementations§
impl Freeze for TemplateElement
impl RefUnwindSafe for TemplateElement
impl Send for TemplateElement
impl Sync for TemplateElement
impl Unpin for TemplateElement
impl UnwindSafe for TemplateElement
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