Struct Builder

struct Builder { ... }

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: &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(self: &mut Self, kind: MatchKind) -> &mut Builder

Set the desired match semantics.

See AhoCorasickBuilder::match_kind for more documentation and examples.

fn ascii_case_insensitive(self: &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(self: &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(self: &mut Self, yes: bool) -> &mut Builder

Enable heuristic prefilter optimizations.

See AhoCorasickBuilder::prefilter for more documentation and examples.

impl Clone for Builder

fn clone(self: &Self) -> Builder

impl Debug for Builder

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

impl Default for Builder

fn default() -> Builder

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

impl<T> Any for Builder

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for Builder

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for Builder

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for Builder

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for Builder

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for Builder

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T, U> Into for Builder

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for Builder

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for Builder

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>