#[repr(u8)]pub enum MatchKind {
Standard = 0,
LeftmostLongest = 1,
LeftmostFirst = 2,
}Expand description
A search option of the Aho-Corasick automaton
specified in DoubleArrayAhoCorasickBuilder::match_kind.
Variants§
Standard = 0
The standard match semantics, which enables
find_iter(),
find_overlapping_iter(), and
find_overlapping_no_suffix_iter().
Patterns are reported in the order that follows the normal behaviour of the Aho-Corasick
algorithm.
LeftmostLongest = 1
The leftmost-longest match semantics, which enables
leftmost_find_iter().
When multiple patterns are started from the same positions, the longest pattern will be
reported. For example, when matching patterns ab|a|abcd over abcd, abcd will be
reported.
LeftmostFirst = 2
The leftmost-first match semantics, which enables
leftmost_find_iter().
When multiple patterns are started from the same positions, the pattern that is registered
earlier will be reported. For example, when matching patterns ab|a|abcd over abcd,
ab will be reported.