Struct Builder

pub struct Builder { /* private fields */ }

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

impl Builder

fn new() -> Builder

Create a new builder for configuring an Aho-Corasick noncontiguous NFA.

fn build<I, P>(&self, patterns: I) -> Result<NFA, BuildError>
where
    I: IntoIterator<Item = P>,
    P: AsRef<[u8]>,

Build an Aho-Corasick noncontiguous NFA from the given iterator of patterns.

A builder may be reused to create more NFAs.

fn match_kind(&mut self, kind: MatchKind) -> &mut Builder

Set the desired match semantics.

See AhoCorasickBuilder::match_kind for more documentation and examples.

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.

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.

fn prefilter(&mut self, yes: bool) -> &mut Builder

Enable heuristic prefilter optimizations.

See AhoCorasickBuilder::prefilter for more documentation and examples.

Trait Implementations

impl Clone for Builder

fn clone(&self) -> Self

impl Debug for Builder

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Default for Builder

fn default() -> Builder

Auto Trait Implementations

impl Freeze for Builder

impl RefUnwindSafe for Builder

impl Send for Builder

impl Sync for Builder

impl Unpin for Builder

impl UnsafeUnpin for Builder

impl UnwindSafe for Builder

Blanket Implementations

impl<T> Any for Builder where T: 'static + ?Sized,

impl<T> Borrow<T> for Builder where T: ?Sized,

impl<T> BorrowMut<T> for Builder where T: ?Sized,

impl<T> CloneToUninit for Builder where T: Clone,

impl<T> From<T> for Builder

impl<T> ToOwned for Builder where T: Clone,

impl<T, U> Into<U> for Builder where U: From<T>,

impl<T, U> TryFrom<U> for Builder where U: Into<T>,

impl<T, U> TryInto<U> for Builder where U: TryFrom<T>,