Trait nickel_mustache::Render
[−]
[src]
pub trait Render {
type Output;
fn render<T, P>(self, path: P, data: &T) -> Self::Output where T: Encodable, P: AsRef<Path>;
fn render_with_layout<T, P, L>(self, path: P, layout: L, data: &T) -> Self::Output where T: Encodable, P: AsRef<Path>, L: AsRef<Path>;
fn render_data<P>(self, path: P, data: &Data) -> Self::Output where P: AsRef<Path>;
fn render_data_with_layout<P, L>(self, path: P, layout: L, data: &Data) -> Self::Output where P: AsRef<Path>, L: AsRef<Path>;
}Extension trait for common mustache::Template usage.
Associated Types
type Output
Return type for all of the extension methods.
Required Methods
fn render<T, P>(self, path: P, data: &T) -> Self::Output where T: Encodable, P: AsRef<Path>
Renders a mustache::Template with specific Encodable data
See examples/example.rs for example usage.
fn render_with_layout<T, P, L>(self, path: P, layout: L, data: &T) -> Self::Output where T: Encodable, P: AsRef<Path>, L: AsRef<Path>
Renders a mustache::Template wrapped inside a specific layout
See examples/with_layout.rs for example usage.
fn render_data<P>(self, path: P, data: &Data) -> Self::Output where P: AsRef<Path>
Renders a mustache::Template with specific mustache::Data
See examples/helper_functions.rs for example usage.
fn render_data_with_layout<P, L>(self, path: P, layout: L, data: &Data) -> Self::Output where P: AsRef<Path>, L: AsRef<Path>
Renders a mustache::Template wrapped inside a specific layout
See examples/with_layout.rs for example usage.
Implementors
impl<'a, 'mw, D> Render for Response<'mw, D> where D: TemplateSupport