Struct horrorshow::TemplateBuffer [] [src]

pub struct TemplateBuffer<'a> { /* fields omitted */ }

A template buffer. This is the type that gets passed to closures inside templates.

Example:

    html! {
        |tmpl /*: &mut TemplateBuffer */| tmpl << "Some String";
    };

Methods

impl<'a> TemplateBuffer<'a>
[src]

[src]

[src]

Write a raw string to the template output.

[src]

Escape and write the formatted arguments to the template output.

Example:

write!(tmpl, "{} + {}", 0, 1);

[src]

Escape and write a string to the template output.

[src]

Returns an escaping Write adapter.

[src]

Returns a non-escaping Write adapter.

Trait Implementations

impl<'a, 'b, T> Shl<T> for &'a mut TemplateBuffer<'b> where
    T: RenderOnce
[src]

The resulting type after applying the << operator.

[src]

Render the component into the template.

Note: If writing to the template fails, this method will neither panic nor return errors. Instead, no more data will be written to the template and horrorshow abort template rendering (return an error) when it re-gains control.

Auto Trait Implementations

impl<'a> !Send for TemplateBuffer<'a>

impl<'a> !Sync for TemplateBuffer<'a>