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.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Builder
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)