[][src]Trait ructe::templates::ToHtml

pub trait ToHtml {
    fn to_html(&self, out: &mut dyn Write) -> Result<()>;
}

This trait should be implemented for any value that can be the result of an expression in a template.

This trait decides how to format the given object as html. There exists a default implementation for any T: Display that formats the value using Display and then html-encodes the result.

Required methods

fn to_html(&self, out: &mut dyn Write) -> Result<()>

Write self to out, which is in html representation.

Loading content...

Implementors

impl<T: Display> ToHtml for Html<T>[src]

impl<T: Display> ToHtml for T[src]

Loading content...