Trait rubble_templates_core::compiler::Compiler [−][src]
Describes a struct that is able to compile a template.
Any implementation of this trait should be able to compile a template from specified input Iterator and Items. For example, you may specify a custom iterator and custom items that are supported by your Compiler.
The compiler should return the resulting String compiled from all items that the iterator returned.
Associated Types
type Item
[src]
Type of a single template part that can be compiled/evaluated/parsed.
Those parts will be compiled into a template
type ItemIterator: Iterator<Item = Self::Item>
[src]
Iterator that can provide template parts that need to be compiled.
Required methods
fn compile<C>(
&self,
content: C,
context: Context
) -> Result<String, CompilationError> where
C: EvaluableMixedContent<Item = Self::Item, IntoIter = Self::ItemIterator>,
[src]
&self,
content: C,
context: Context
) -> Result<String, CompilationError> where
C: EvaluableMixedContent<Item = Self::Item, IntoIter = Self::ItemIterator>,