I'm using the sitemap crate and I'm trying to figure out how to write to a buffered in-memory String in Rust.
let mut buffer = BufWriter::new(io::stdout()); // -- here, how do I put in a String? let sitemap_writer = SiteMapWriter::new(buffer);
The above example is for stdout and I've seen other examples for output to files. However, I just want to write to an in-memory String. How do I do that?
I'm trying to do something like Java's StringBuffer.
Can anyone please help? Thanks!