far_shared

Trait Render

Source
pub trait Render {
    // Required methods
    fn render(&self) -> HashMap<&'static str, String>;
    fn keys() -> Box<dyn Iterator<Item = &'static str>>;
}
Expand description

A type whose contents can be rendered into a template

Required Methods§

Source

fn render(&self) -> HashMap<&'static str, String>

Perform the rendering

The keys of the hashmap are the names of the placeholders in the template, while the values are what will replace the former in the rendered template.

Source

fn keys() -> Box<dyn Iterator<Item = &'static str>>

Get a list of the placeholder names

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§