Trait rubble_templates_core::compiler::Compiler[][src]

pub trait Compiler<T> {
    type Item;
    type ItemIterator: Iterator<Item = Self::Item>;
    fn compile<C>(
        &self,
        content: C,
        context: Context
    ) -> Result<String, CompilationError>
    where
        C: EvaluableMixedContent<Item = Self::Item, IntoIter = Self::ItemIterator>
; }
Expand description

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 of a single template part that can be compiled/evaluated/parsed.

Those parts will be compiled into a template

Iterator that can provide template parts that need to be compiled.

Required methods

Implementors