Struct aho_corasick::AcAutomaton[][src]

pub struct AcAutomaton<P, T = Dense> { /* fields omitted */ }
Expand description

An Aho-Corasick finite automaton.

The type parameter P is the type of the pattern that was used to construct this AcAutomaton.

Implementations

Create a new automaton from an iterator of patterns.

The patterns must be convertible to bytes (&[u8]) via the AsRef trait.

Create a new automaton from an iterator of patterns.

This constructor allows one to choose the transition representation.

The patterns must be convertible to bytes (&[u8]) via the AsRef trait.

Build out the entire automaton into a single matrix.

This will make searching as fast as possible at the expense of using at least 4 * 256 * #states bytes of memory.

Trait Implementations

Return the next state given the current state and next character.

Build a match given the current state, pattern index and input index.

Return true if and only if the given state and current pattern index indicate a match. Read more

Return the set of bytes that have transitions in the root state.

Returns all of the patterns matched by this automaton. Read more

Returns the pattern indexed at i. Read more

Return the number of patterns in the automaton.

Returns true if the automaton has no patterns.

Returns an iterator of non-overlapping matches in s.

Returns an iterator of overlapping matches in s.

Returns an iterator of non-overlapping matches in the given reader.

Returns an iterator of overlapping matches in the given reader.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Create an automaton from an iterator of strings.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.