Question for the Rust folks: When reading data from a file, I often want a buffe...
arya dradjica @bal4e@tech.lgbt
Question for the Rust folks: When reading data from a file, I often want a buffer type that can grow to accommodate anything I want to store contiguously. E.g. if I'm searching for a substring foobar, the buffer should always give me a window of 6 bytes or more. std::io::BufRead doesn't provide this -- instead it provides a buffer of an implementation-controlled size, with no means of dynamic growth. In the worst case, an implementation might give you one byte of the input at a time. Does anybody know of an existing Rust library implementing the alternative I described? Or should I publish one myself? (it's about 200 lines of moderately complex code that I find myself writing more than once a year.)