[][src]Trait askama::Template

pub trait Template {
    fn render_into(&self, writer: &mut dyn Write) -> Result<()>;
fn extension() -> Option<&'static str>
    where
        Self: Sized
;
fn size_hint() -> usize; fn render(&self) -> Result<String> { ... } }

Main Template trait; implementations are generally derived

Required methods

fn render_into(&self, writer: &mut dyn Write) -> Result<()>

Renders the template to the given writer buffer

fn extension() -> Option<&'static str> where
    Self: Sized

Helper function to inspect the template's extension

fn size_hint() -> usize

Provides an conservative estimate of the expanded length of the rendered template

Loading content...

Provided methods

fn render(&self) -> Result<String>

Helper method which allocates a new String and renders into it

Loading content...

Implementors

Loading content...