Trait RenderContext

Source
pub trait RenderContext: Serialize {
    const TEMPLATE_NAME: &'static str;
    const MIME_TYPE: &'static str;

    // Required method
    fn render(&self, renderer: &Renderer) -> Result<String, Error>;
}

Required Associated Constants§

Source

const TEMPLATE_NAME: &'static str

The name of the template to render

Source

const MIME_TYPE: &'static str

The MIME type (Content-Type) of the data that gets rendered by this Template

Required Methods§

Source

fn render(&self, renderer: &Renderer) -> Result<String, Error>

render the context data

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§