Struct aho_corasick::nfa::noncontiguous::Builder
source · 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.