Struct aho_corasick::FullAcAutomaton [] [src]

pub struct FullAcAutomaton {
    // 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 FullAcAutomaton

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

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

Trait Implementations

impl Automaton for FullAcAutomaton

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) -> &[String]

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

fn len(&self) -> usize

fn is_empty(&self) -> bool

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

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

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

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

Derived Implementations

impl Debug for FullAcAutomaton

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

impl Clone for FullAcAutomaton

fn clone(&self) -> FullAcAutomaton

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