Enum aho_corasick::packed::MatchKind
source · [−]pub enum MatchKind {
LeftmostFirst,
LeftmostLongest,
// some variants omitted
}
Expand description
A knob for controlling the match semantics of a packed multiple string searcher.
This differs from the
MatchKind
type in the top-level crate module in that it doesn’t support
“standard” match semantics, and instead only supports leftmost-first or
leftmost-longest. Namely, “standard” semantics cannot be easily supported
by packed searchers.
For more information on the distinction between leftmost-first and
leftmost-longest, see the docs on the top-level MatchKind
type.
Unlike the top-level MatchKind
type, the default match semantics for this
type are leftmost-first.
Variants
LeftmostFirst
Use leftmost-first match semantics, which reports leftmost matches. When there are multiple possible leftmost matches, the match corresponding to the pattern that appeared earlier when constructing the automaton is reported.
This is the default.
LeftmostLongest
Use leftmost-longest match semantics, which reports leftmost matches. When there are multiple possible leftmost matches, the longest match is chosen.
Trait Implementations
impl Copy for MatchKind
impl Eq for MatchKind
impl StructuralEq for MatchKind
impl StructuralPartialEq for MatchKind
Auto Trait Implementations
impl RefUnwindSafe for MatchKind
impl Send for MatchKind
impl Sync for MatchKind
impl Unpin for MatchKind
impl UnwindSafe for MatchKind
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more