Buffer { for_html: false, buffer: String::new() }
}
- crate fn is_empty(&self) -> bool {
- self.buffer.is_empty()
- }
-
crate fn into_inner(self) -> String {
self.buffer
}
- crate fn insert_str(&mut self, idx: usize, s: &str) {
- self.buffer.insert_str(idx, s);
- }
-
- crate fn push_str(&mut self, s: &str) {
- self.buffer.push_str(s);
- }
-
// Intended for consumption by write! and writeln! (std::fmt) but without
// the fmt::Result return type imposed by fmt::Write (and avoiding the trait
// import).