Enum MatchKind

enum MatchKind

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.

Implementations

impl Clone for MatchKind

fn clone(self: &Self) -> MatchKind

impl Copy for MatchKind

impl Debug for MatchKind

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl Default for MatchKind

fn default() -> MatchKind

impl Eq for MatchKind

impl Freeze for MatchKind

impl PartialEq for MatchKind

fn eq(self: &Self, other: &MatchKind) -> bool

impl RefUnwindSafe for MatchKind

impl Send for MatchKind

impl StructuralPartialEq for MatchKind

impl Sync for MatchKind

impl Unpin for MatchKind

impl UnsafeUnpin for MatchKind

impl UnwindSafe for MatchKind

impl<T> Any for MatchKind

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for MatchKind

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for MatchKind

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for MatchKind

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for MatchKind

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for MatchKind

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T, U> Into for MatchKind

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for MatchKind

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for MatchKind

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>