Module prefilter

Source

StructsΒ§

Builder πŸ”’
A builder for constructing the best possible prefilter. When constructed, this builder will heuristically select the best prefilter it can build, if any, and discard the rest.
Memmem πŸ”’
A type that wraps a SIMD accelerated single substring search from the memchr crate for use as a prefilter.
MemmemBuilder πŸ”’
A builder for constructing a prefilter that uses memmem.
Packed πŸ”’
A type that wraps a packed searcher and implements the Prefilter interface.
Prefilter
A prefilter for accelerating a search.
RareByteOffset πŸ”’
Offsets associated with an occurrence of a β€œrare” byte in any of the patterns used to construct a single Aho-Corasick automaton.
RareByteOffsets πŸ”’
A set of byte offsets, keyed by byte.
RareBytesBuilder πŸ”’
A builder for constructing a rare byte prefilter.
RareBytesOne πŸ”’
A prefilter for scanning for a single β€œrare” byte.
RareBytesThree πŸ”’
A prefilter for scanning for three β€œrare” bytes.
RareBytesTwo πŸ”’
A prefilter for scanning for two β€œrare” bytes.
StartBytesBuilder πŸ”’
A builder for constructing a starting byte prefilter.
StartBytesOne πŸ”’
A prefilter for scanning for a single starting byte.
StartBytesThree πŸ”’
A prefilter for scanning for three starting bytes.
StartBytesTwo πŸ”’
A prefilter for scanning for two starting bytes.

EnumsΒ§

Candidate
A candidate is the result of running a prefilter on a haystack at a particular position.

TraitsΒ§

PrefilterI πŸ”’
A prefilter describes the behavior of fast literal scanners for quickly skipping past bytes in the haystack that we know cannot possibly participate in a match.

FunctionsΒ§

freq_rank πŸ”’
Return the frequency rank of the given byte. The higher the rank, the more common the byte (heuristically speaking).
opposite_ascii_case πŸ”’
If the given byte is an ASCII letter, then return it in the opposite case. e.g., Given b'A', this returns b'a', and given b'a', this returns b'A'. If a non-ASCII letter is given, then the given byte is returned.