Struct cssparser::CssStringWriter [−][src]
pub struct CssStringWriter<'a, W> { /* fields omitted */ }
Expand description
A fmt::Write
adapter that escapes text for writing as a double-quoted CSS string.
Quotes are not included.
Typical usage:
ⓘ
fn write_foo<W>(foo: &Foo, dest: &mut W) -> fmt::Result where W: fmt::Write {
dest.write_str("\"")?;
{
let mut string_dest = CssStringWriter::new(dest);
// Write into string_dest...
}
dest.write_str("\"")?;
Ok(())
}
Implementations
Wrap a text writer to create a CssStringWriter
.
Trait Implementations
Writes a string slice into this writer, returning whether the write succeeded. Read more