[−][src]Struct aho_corasick::AcAutomaton
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]
[−]
impl<P: AsRef<[u8]>> AcAutomaton<P>
pub fn new<I>(pats: I) -> AcAutomaton<P, Dense> where
I: IntoIterator<Item = P>,
[src]
[−]
pub fn new<I>(pats: I) -> AcAutomaton<P, Dense> where
I: IntoIterator<Item = P>,
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]
[−]
impl<P: AsRef<[u8]>, T: Transitions> AcAutomaton<P, T>
pub fn with_transitions<I>(pats: I) -> AcAutomaton<P, T> where
I: IntoIterator<Item = P>,
[src]
[−]
pub fn with_transitions<I>(pats: I) -> AcAutomaton<P, T> where
I: IntoIterator<Item = P>,
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.
pub fn into_full(self) -> FullAcAutomaton<P>
[src]
[−]
pub fn into_full(self) -> FullAcAutomaton<P>
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: AsRef<[u8]>, T: Transitions> Automaton<P> for AcAutomaton<P, T>
[src]
[+]
impl<P: AsRef<[u8]>, T: Transitions> Automaton<P> for AcAutomaton<P, T>
impl<P: Clone, T: Clone> Clone for AcAutomaton<P, T>
[src]
[+]
impl<P: Clone, T: Clone> Clone for AcAutomaton<P, T>
impl<P: AsRef<[u8]> + Debug, T: Transitions> Debug for AcAutomaton<P, T>
[src]
[+]
impl<P: AsRef<[u8]> + Debug, T: Transitions> Debug for AcAutomaton<P, T>
impl<S: AsRef<[u8]>> FromIterator<S> for AcAutomaton<S>
[src]
[+]
impl<S: AsRef<[u8]>> FromIterator<S> for AcAutomaton<S>
Auto Trait Implementations
impl<P, T> Send for AcAutomaton<P, T> where
P: Send,
T: Send,
impl<P, T> Send for AcAutomaton<P, T> where
P: Send,
T: Send,
impl<P, T> Sync for AcAutomaton<P, T> where
P: Sync,
T: Sync,
impl<P, T> Sync for AcAutomaton<P, T> where
P: Sync,
T: Sync,
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
[−]
impl<T> ToOwned for T where
T: Clone,
type Owned = T
fn to_owned(&self) -> T
[src]
[−]
fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)
[src]
[−]
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T, U> Into for T where
U: From<T>,
[src]
[−]
impl<T, U> Into for T where
U: From<T>,
impl<T> From for T
[src]
[−]
impl<T> From for T
impl<T, U> TryFrom for T where
T: From<U>,
[src]
[−]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
[−]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
[−]
impl<T> Borrow for T where
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
[−]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
[−]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> BorrowMut for T where
T: ?Sized,
[src]
[−]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
[−]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Any for T where
T: 'static + ?Sized,
[src]
[−]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
[−]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more