Struct aho_corasick::AcAutomaton [] [src]

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

An Aho-Corasick finite automaton.

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

Methods

impl<P: AsRef<[u8]>> AcAutomaton<P>
[src]

[src]

Create a new automaton from an iterator of patterns.

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

impl<P: AsRef<[u8]>, T: Transitions> AcAutomaton<P, T>
[src]

[src]

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.

[src]

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

impl<P: Clone, T: Clone> Clone for AcAutomaton<P, T>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<P: AsRef<[u8]>, T: Transitions> Automaton<P> for AcAutomaton<P, T>
[src]

[src]

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

[src]

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

[src]

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

[src]

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

[src]

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

[src]

Returns the pattern indexed at i. Read more

[src]

Return the number of patterns in the automaton.

[src]

Returns true if the automaton has no patterns.

[src]

Returns an iterator of non-overlapping matches in s.

[src]

Returns an iterator of overlapping matches in s.

[src]

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

[src]

Returns an iterator of overlapping matches in the given reader.

impl<S: AsRef<[u8]>> FromIterator<S> for AcAutomaton<S>
[src]

[src]

Create an automaton from an iterator of strings.

impl<P: AsRef<[u8]> + Debug, T: Transitions> Debug for AcAutomaton<P, T>
[src]

[src]

Formats the value using the given formatter.