pub trait Template: Display {
const EXTENSION: Option<&'static str>;
const SIZE_HINT: usize;
const MIME_TYPE: &'static str;
fn render_into(&self, writer: &mut impl Write) -> Result<(), Error>;
fn render(&self) -> Result<String, Error> { ... }
fn write_into(&self, writer: &mut impl Write) -> Result<(), Error> { ... }
}Expand description
Main Template trait; implementations are generally derived
If you need an object-safe template, use DynTemplate.
Required Associated Constants
Provides a conservative estimate of the expanded length of the rendered template
Required Methods
Provided Methods
Helper method which allocates a new String and renders into it