Closed s3bk closed 3 years ago
Thanks, but this is not the right API. Moreover, this crate is currenrly undergoing a rewrite and supporting streaming in the rewrite is a little more challenging.
The main problem with this API is that an iterator that yields single bytes makes it impossible to use fast prefilters (which exist in the rewrite).
If you need to support streaming, I urge you to write it yourself in your own project. That's exactly why low level DFA transition functions are exposed. So that you can walk the DFA in any way you want.
In general, before making API additions, please discuss them first before submitting a PR.
One does not always have a slice of data to work with.
find_iter
andrfind_iter
provide a loophole to use iterators instead.