Struct maud::Escaper
[−]
[src]
pub struct Escaper<W: Write> { // some 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(), "<script>launchMissiles()</script>");
Methods
impl<W: Write> Escaper<W>
fn new(inner: W) -> Escaper<W>
Creates an Escaper
from a std::fmt::Write
.
fn into_inner(self) -> W
Extracts the inner writer.