Template

Trait Template 

Source
pub trait Template {
    const EXTENSION: &'static str;
    const MIME_TYPE: &'static str;
    const SIZE_HINT: usize;

    // Required method
    fn write_fmt<W>(&self, w: &mut W) -> Result
       where W: Write + ?Sized;

    // Provided method
    fn render(&self) -> String { ... }
}

Required Associated Constants§

Source

const EXTENSION: &'static str

Source

const MIME_TYPE: &'static str

Source

const SIZE_HINT: usize

Required Methods§

Source

fn write_fmt<W>(&self, w: &mut W) -> Result
where W: Write + ?Sized,

Provided Methods§

Source

fn render(&self) -> String

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§