pub fn render<T>(&self, name: &str, data: &T) -> Result<String, RenderError>
    where
        T: Serialize,
    {
        let mut output = StringOutput::new();
        let ctx = Context::wraps(&data)?;
        self.render_to_output(name, &ctx, &mut output)?;
        output.into_string().map_err(RenderError::from)
    }
/// Render a registered template with some data into a string
///
/// * `name` is the template name you registered previously
/// * `data` is the data that implements `serde::Serialize`
///
/// Returns rendered string or a struct with error information


Returns rendered string or a struct with error information
Returns rendered string or a struct with error information
pub fn render<T>(&self, name: &str, data: &T) -> Result<String, RenderError>
    where
        T: Serialize,
    {
        let mut output = StringOutput::new();
        let ctx = Context::wraps(&data)?;
        self.render_to_output(name, &ctx, &mut output)?;
        output.into_string().map_err(RenderError::from)
    }
pub fn render < T > ( & self , name : & str , data : & T ) -> Result < String , RenderError > where T : Serialize , { let mut output = StringOutput :: new ( ) ; let ctx = Context :: wraps ( & data ) ? ; self . render_to_output ( name , & ctx , & mut output ) ? ; output . into_string ( ) . map_err ( RenderError :: from ) }
Render a registered template with some data into a string
 `name` is the template name you registered previously
 `data` is the data that implements `serde::Serialize`
Render a registered template with some data into a string ` name ` is the template name you registered previously ` data ` is the data that implements ` serde :: Serialize `
&self
name
&str
data
&T
&self
name
&str
data
&T