pub fn render_template_to_write<T, W>(
        &self,
        template_string: &str,
        data: &T,
        writer: W,
    ) -> Result<(), RenderError>
    where
        T: Serialize,
        W: Write,
    {
        let tpl = Template::compile2(
            template_string,
            TemplateOptions {
                prevent_indent: self.prevent_indent,
                ..Default::default()
            },
        )?;
        let ctx = Context::wraps(data)?;
        let mut render_context = RenderContext::new(None);
        let mut out = WriteOutput::new(writer);
        tpl.render(self, &ctx, &mut render_context, &mut out)
    }
/// Render a template string using current registry without registering it
Render a template string using current registry without registering it
Render a template string using current registry without registering it
pub fn render_template_to_write<T, W>(
        &self,
        template_string: &str,
        data: &T,
        writer: W,
    ) -> Result<(), RenderError>
    where
        T: Serialize,
        W: Write,
    {
        let tpl = Template::compile2(
            template_string,
            TemplateOptions {
                prevent_indent: self.prevent_indent,
                ..Default::default()
            },
        )?;
        let ctx = Context::wraps(data)?;
        let mut render_context = RenderContext::new(None);
        let mut out = WriteOutput::new(writer);
        tpl.render(self, &ctx, &mut render_context, &mut out)
    }
pub fn render_template_to_write < T , W > ( & self , template_string : & str , data : & T , writer : W , ) -> Result < ( ) , RenderError > where T : Serialize , W : Write , { let tpl = Template :: compile2 ( template_string , TemplateOptions { prevent_indent : self . prevent_indent , .. Default :: default ( ) } , ) ? ; let ctx = Context :: wraps ( data ) ? ; let mut render_context = RenderContext :: new ( None ) ; let mut out = WriteOutput :: new ( writer ) ; tpl . render ( self , & ctx , & mut render_context , & mut out ) }
Render a template string using current registry without registering it
Render a template string using current registry without registering it
&self
template_string
&str
data
&T
writer
W
&self
template_string
&str
data
&T
writer
W