pub struct Builder { /* private fields */ }
Expand description
A builder for configuring an Aho-Corasick noncontiguous NFA.
This builder has a subset of the options available to a
AhoCorasickBuilder
. Of the shared options,
their behavior is identical.
Implementations§
Source§impl Builder
impl Builder
Sourcepub fn new() -> Builder
pub fn new() -> Builder
Create a new builder for configuring an Aho-Corasick noncontiguous NFA.
Sourcepub fn build<I, P>(&self, patterns: I) -> Result<NFA, BuildError>
pub fn build<I, P>(&self, patterns: I) -> Result<NFA, BuildError>
Build an Aho-Corasick noncontiguous NFA from the given iterator of patterns.
A builder may be reused to create more NFAs.
Sourcepub fn match_kind(&mut self, kind: MatchKind) -> &mut Builder
pub fn match_kind(&mut self, kind: MatchKind) -> &mut Builder
Set the desired match semantics.
See
AhoCorasickBuilder::match_kind
for more documentation and examples.
Sourcepub fn ascii_case_insensitive(&mut self, yes: bool) -> &mut Builder
pub fn ascii_case_insensitive(&mut self, yes: bool) -> &mut Builder
Enable ASCII-aware case insensitive matching.
See
AhoCorasickBuilder::ascii_case_insensitive
for more documentation and examples.
Sourcepub fn dense_depth(&mut self, depth: usize) -> &mut Builder
pub fn dense_depth(&mut self, depth: usize) -> &mut Builder
Set the limit on how many states use a dense representation for their transitions. Other states will generally use a sparse representation.
See
AhoCorasickBuilder::dense_depth
for more documentation and examples.
Sourcepub fn prefilter(&mut self, yes: bool) -> &mut Builder
pub fn prefilter(&mut self, yes: bool) -> &mut Builder
Enable heuristic prefilter optimizations.
See
AhoCorasickBuilder::prefilter
for more documentation and examples.