Struct aho_corasick::FullAcAutomaton [−][src]
pub struct FullAcAutomaton<P> { /* 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>[src]
impl<P: AsRef<[u8]>> FullAcAutomaton<P>pub fn new<T: Transitions>(ac: AcAutomaton<P, T>) -> FullAcAutomaton<P>[src]
pub 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: Clone> Clone for FullAcAutomaton<P>[src]
impl<P: Clone> Clone for FullAcAutomaton<P>fn clone(&self) -> FullAcAutomaton<P>[src]
fn clone(&self) -> FullAcAutomaton<P>Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl<P: AsRef<[u8]>> Automaton<P> for FullAcAutomaton<P>[src]
impl<P: AsRef<[u8]>> Automaton<P> for FullAcAutomaton<P>fn next_state(&self, si: StateIdx, i: u8) -> StateIdx[src]
fn next_state(&self, si: StateIdx, i: u8) -> StateIdxReturn the next state given the current state and next character.
fn get_match(&self, si: StateIdx, outi: usize, texti: usize) -> Match[src]
fn get_match(&self, si: StateIdx, outi: usize, texti: usize) -> MatchBuild a match given the current state, pattern index and input index.
fn has_match(&self, si: StateIdx, outi: usize) -> bool[src]
fn has_match(&self, si: StateIdx, outi: usize) -> boolReturn true if and only if the given state and current pattern index indicate a match. Read more
fn start_bytes(&self) -> &[u8][src]
fn start_bytes(&self) -> &[u8]Return the set of bytes that have transitions in the root state.
fn patterns(&self) -> &[P][src]
fn patterns(&self) -> &[P]Returns all of the patterns matched by this automaton. Read more
fn pattern(&self, i: usize) -> &P[src]
fn pattern(&self, i: usize) -> &PReturns the pattern indexed at i. Read more
fn len(&self) -> usize[src]
fn len(&self) -> usizeReturn the number of patterns in the automaton.
fn is_empty(&self) -> bool[src]
fn is_empty(&self) -> boolReturns true if the automaton has no patterns.
ⓘImportant traits for Matches<'a, 's, P, A>fn find<'a, 's, Q: ?Sized + AsRef<[u8]>>(
&'a self,
s: &'s Q
) -> Matches<'a, 's, P, Self> where
Self: Sized, [src]
fn find<'a, 's, Q: ?Sized + AsRef<[u8]>>(
&'a self,
s: &'s Q
) -> Matches<'a, 's, P, Self> where
Self: Sized, Returns an iterator of non-overlapping matches in s.
ⓘImportant traits for MatchesOverlapping<'a, 's, P, A>fn find_overlapping<'a, 's, Q: ?Sized + AsRef<[u8]>>(
&'a self,
s: &'s Q
) -> MatchesOverlapping<'a, 's, P, Self> where
Self: Sized, [src]
fn find_overlapping<'a, 's, Q: ?Sized + AsRef<[u8]>>(
&'a self,
s: &'s Q
) -> MatchesOverlapping<'a, 's, P, Self> where
Self: Sized, Returns an iterator of overlapping matches in s.
ⓘImportant traits for StreamMatches<'a, R, P, A>fn stream_find<'a, R: Read>(&'a self, rdr: R) -> StreamMatches<'a, R, P, Self> where
Self: Sized, [src]
fn stream_find<'a, R: Read>(&'a self, rdr: R) -> StreamMatches<'a, R, P, Self> where
Self: Sized, Returns an iterator of non-overlapping matches in the given reader.
ⓘImportant traits for StreamMatchesOverlapping<'a, R, P, A>fn stream_find_overlapping<'a, R: Read>(
&'a self,
rdr: R
) -> StreamMatchesOverlapping<'a, R, P, Self> where
Self: Sized, [src]
fn stream_find_overlapping<'a, R: Read>(
&'a self,
rdr: R
) -> StreamMatchesOverlapping<'a, R, P, Self> where
Self: Sized, Returns an iterator of overlapping matches in the given reader.
impl<P: AsRef<[u8]> + Debug> Debug for FullAcAutomaton<P>[src]
impl<P: AsRef<[u8]> + Debug> Debug for FullAcAutomaton<P>Auto Trait Implementations
impl<P> Send for FullAcAutomaton<P> where
P: Send,
impl<P> Send for FullAcAutomaton<P> where
P: Send, impl<P> Sync for FullAcAutomaton<P> where
P: Sync,
impl<P> Sync for FullAcAutomaton<P> where
P: Sync,