Struct aho_corasick::FullAcAutomaton [] [src]

pub struct FullAcAutomaton<P> {
    // some fields omitted
}

A complete Aho-Corasick automaton.

This uses a single transition matrix that permits each input character to move to the next state with a single lookup in the matrix.

This is as fast as it gets, but it is guaranteed to use a lot of memory. Namely, it will use at least 4 * 256 * #states, where the number of states is capped at length of all patterns concatenated.

Methods

impl<P: AsRef<[u8]>> FullAcAutomaton<P>

fn new<T: Transitions>(ac: AcAutomaton<P, T>) -> FullAcAutomaton<P>

Build a new expanded Aho-Corasick automaton from an existing Aho-Corasick automaton.

Trait Implementations

impl<P: AsRef<[u8]>> Automaton<P> for FullAcAutomaton<P>

fn next_state(&self, si: StateIdx, i: u8) -> StateIdx

fn get_match(&self, si: StateIdx, outi: usize, texti: usize) -> Match

fn has_match(&self, si: StateIdx, outi: usize) -> bool

fn skip_to(&self, si: StateIdx, text: &[u8], at: usize) -> usize

fn is_skippable(&self) -> bool

fn patterns(&self) -> &[P]

fn pattern(&self, i: usize) -> &P

fn len(&self) -> usize

fn is_empty(&self) -> bool

fn find<'a, 's>(&'a self, s: &'s str) -> Matches<'a, 's, P, Self>

fn find_overlapping<'a, 's>(&'a self, s: &'s str) -> MatchesOverlapping<'a, 's, P, Self>

fn stream_find<'a, R: Read>(&'a self, rdr: R) -> StreamMatches<'a, R, P, Self>

fn stream_find_overlapping<'a, R: Read>(&'a self, rdr: R) -> StreamMatchesOverlapping<'a, R, P, Self>

impl<P: AsRef<[u8]> + Debug> Debug for FullAcAutomaton<P>

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

Derived Implementations

impl<P: Clone> Clone for FullAcAutomaton<P> where P: Clone

fn clone(&self) -> FullAcAutomaton<P>

fn clone_from(&mut self, source: &Self)