Trait maud::Render
[−]
[src]
pub trait Render { fn render(&self, &mut Write) -> Result; }
Represents a type that can be rendered as HTML.
Most of the time you should implement std::fmt::Display
instead,
which will be picked up by the blanket impl.
Required Methods
fn render(&self, &mut Write) -> Result
Renders self
to the given writer.
Note that the writer does not perform automatic escaping. You
must make sure that any data written is properly escaped,
whether by hand or using the Escaper
wrapper struct.
Implementors
impl<T: Display + ?Sized> Render for T
impl Render for String
impl Render for str
impl<T: Display> Render for PreEscaped<T>
impl Render for PreEscaped<String>
impl<'a> Render for PreEscaped<&'a str>