We may (and I have plans for aarch64 at least) be able to expose a way to iterate over the indexes of the haystack which matches one of our bytes which is more efficient than simply calling .find repeatedly.
We should expose an interface like
pub struct BytesIter<F> { /* impl details */ }
impl Bytes<F> {
pub fn iter(&self, haystack: &[u8]) -> BytesIter<F> { ... }
}
pub struct AsciiCharsIter<F>(BytesIter<F>);
impl AsciiChars<F> {
pub fn iter(&self, haystack: &str) -> AsciiCharsIter<F> { AsciiCharsIter(self.0.iter(haystack.as_bytes()) }
}
We may (and I have plans for aarch64 at least) be able to expose a way to iterate over the indexes of the haystack which matches one of our bytes which is more efficient than simply calling
.findrepeatedly.We should expose an interface like