pub fn new(
        template: &'a Template,
        tera: &'a Tera,
        context: &'a Value,
        should_escape: bool,
    ) -> Self {
        // Gets the root template if we are rendering something with inheritance or just return
        // the template we're dealing with otherwise
        let template_root = template
            .parents
            .last()
            .map(|parent| tera.get_template(parent).unwrap())
            .unwrap_or(template);

        let call_stack = CallStack::new(&context, template);

        Processor {
            template,
            template_root,
            tera,
            call_stack,
            macros: MacroCollection::from_original_template(&template, &tera),
            should_escape,
            blocks: Vec::new(),
        }
    }
/// Create a new `Processor` that will do the rendering
Create a new `Processor` that will do the rendering
Create a new ` Processor ` that will do the rendering
pub fn new(
        template: &'a Template,
        tera: &'a Tera,
        context: &'a Value,
        should_escape: bool,
    ) -> Self {
        // Gets the root template if we are rendering something with inheritance or just return
        // the template we're dealing with otherwise
        let template_root = template
            .parents
            .last()
            .map(|parent| tera.get_template(parent).unwrap())
            .unwrap_or(template);
        let call_stack = CallStack::new(&context, template);
        Processor {
            template,
            template_root,
            tera,
            call_stack,
            macros: MacroCollection::from_original_template(&template, &tera),
            should_escape,
            blocks: Vec::new(),
        }
    }
pub fn new ( template : & ' a Template , tera : & ' a Tera , context : & ' a Value , should_escape : bool , ) -> Self { // Gets the root template if we are rendering something with inheritance or just return // the template we're dealing with otherwise let template_root = template . parents . last ( ) . map ( | parent | tera . get_template ( parent ) . unwrap ( ) ) . unwrap_or ( template ) ; let call_stack = CallStack :: new ( & context , template ) ; Processor { template , template_root , tera , call_stack , macros : MacroCollection :: from_original_template ( & template , & tera ) , should_escape , blocks : Vec :: new ( ) , } }
Create a new `Processor` that will do the rendering
Create a new ` Processor ` that will do the rendering
template
&'a Template
tera
&'a Tera
context
&'a Value
should_escape
bool
template
&'a Template
tera
&'a Tera
context
&'a Value
should_escape
bool