Struct rocket_dyn_templates::handlebars::template::Template
source · pub struct Template {
pub name: Option<String>,
pub elements: Vec<TemplateElement, Global>,
pub mapping: Vec<TemplateMapping, Global>,
}
Expand description
A handlebars template
Fields§
§name: Option<String>
§elements: Vec<TemplateElement, Global>
§mapping: Vec<TemplateMapping, Global>
Implementations§
Trait Implementations§
source§impl Evaluable for Template
impl Evaluable for Template
fn eval<'reg, 'rc>( &'reg self, registry: &'reg Registry<'reg>, ctx: &'rc Context, rc: &mut RenderContext<'reg, 'rc> ) -> Result<(), RenderError>where 'reg: 'rc,
source§impl PartialEq<Template> for Template
impl PartialEq<Template> for Template
source§impl Renderable for Template
impl Renderable for Template
source§fn render<'reg, 'rc>(
&'reg self,
registry: &'reg Registry<'reg>,
ctx: &'rc Context,
rc: &mut RenderContext<'reg, 'rc>,
out: &mut dyn Output
) -> Result<(), RenderError>where
'reg: 'rc,
fn render<'reg, 'rc>( &'reg self, registry: &'reg Registry<'reg>, ctx: &'rc Context, rc: &mut RenderContext<'reg, 'rc>, out: &mut dyn Output ) -> Result<(), RenderError>where 'reg: 'rc,
render into RenderContext’s
writer
source§fn renders<'reg, 'rc>(
&'reg self,
registry: &'reg Registry<'reg>,
ctx: &'rc Context,
rc: &mut RenderContext<'reg, 'rc>
) -> Result<String, RenderError>where
'reg: 'rc,
fn renders<'reg, 'rc>( &'reg self, registry: &'reg Registry<'reg>, ctx: &'rc Context, rc: &mut RenderContext<'reg, 'rc> ) -> Result<String, RenderError>where 'reg: 'rc,
render into string
impl Eq for Template
impl StructuralEq for Template
impl StructuralPartialEq for Template
Auto Trait Implementations§
impl RefUnwindSafe for Template
impl Send for Template
impl Sync for Template
impl Unpin for Template
impl UnwindSafe for Template
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoCollection<T> for T
impl<T> IntoCollection<T> for T
§fn into_collection<A>(self) -> SmallVec<A>where
A: Array<Item = T>,
fn into_collection<A>(self) -> SmallVec<A>where A: Array<Item = T>,
Converts
self
into a collection.