Struct aho_corasick::util::prefilter::Memmem
source · struct Memmem(Finder<'static>);
Expand description
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.
Tuple Fields§
§0: Finder<'static>