A type that wraps a SIMD accelerated single substring search from the
memchr crate for use as a prefilter.
Currently, this prefilter is only active for Aho-Corasick searchers with
a single pattern. In theory, this could be extended to support searchers
that have a common prefix of more than one byte (for one byte, we would use
memchr), but it’s not clear if it’s worth it or not.
Also, unfortunately, this currently also requires the ‘std’ feature to
be enabled. That’s because memchr doesn’t have a no-std-but-with-alloc
mode, and so APIs like Finder::into_owned aren’t available when ‘std’ is
disabled. But there should be an ‘alloc’ feature that brings in APIs like
Finder::into_owned but doesn’t use std-only features like runtime CPU
feature detection.
Returns the next possible match candidate. This may yield false
positives, so callers must confirm a match starting at the position
returned. This, however, must never produce false negatives. That is,
this must, at minimum, return the starting position of the next match
in the given haystack after or at the given position.