Struct maud::Escaper [] [src]

pub struct Escaper<W: Write> { /* fields omitted */ }

An adapter that escapes HTML special characters.

Example

use std::fmt::Write;
let mut escaper = Escaper::new(String::new());
write!(escaper, "<script>launchMissiles()</script>").unwrap();
assert_eq!(escaper.into_inner(), "&lt;script&gt;launchMissiles()&lt;/script&gt;");Run

Methods

impl<W: Write> Escaper<W>
[src]

Creates an Escaper from a std::fmt::Write.

Extracts the inner writer.

Trait Implementations

impl<W: Write> Write for Escaper<W>
[src]

Writes a slice of bytes into this writer, returning whether the write succeeded. Read more

Writes a char into this writer, returning whether the write succeeded. Read more

Glue for usage of the write! macro with implementors of this trait. Read more