#[non_exhaustive]pub enum AtomKind {
Fuzzy,
Substring,
Prefix,
Postfix,
Exact,
}Expand description
The kind of matching algorithm to run for an atom.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Fuzzy
Fuzzy matching where the needle must match any haystack characters (match can contain gaps). This atom kind is used by default if no special syntax is used. There is no negated fuzzy matching (too many false positives).
See also Matcher::fuzzy_match.
Substring
The needle must match a contiguous sequence of haystack characters
without gaps. This atom kind is parsed from the following syntax:
'foo and !foo (negated).
See also Matcher::substring_match.
Prefix
The needle must match all leading haystack characters without gaps or
prefix. This atom kind is parsed from the following syntax: ^foo and
!^foo (negated).
See also Matcher::prefix_match.
Postfix
The needle must match all trailing haystack characters without gaps or
postfix. This atom kind is parsed from the following syntax: foo$ and
!foo$ (negated).
See also Matcher::postfix_match.
Exact
The needle must match all haystack characters without gaps or prefix.
This atom kind is parsed from the following syntax: ^foo$ and !^foo$
(negated).
See also Matcher::exact_match.
Trait Implementations§
impl Copy for AtomKind
impl Eq for AtomKind
impl StructuralPartialEq for AtomKind
Auto Trait Implementations§
impl Freeze for AtomKind
impl RefUnwindSafe for AtomKind
impl Send for AtomKind
impl Sync for AtomKind
impl Unpin for AtomKind
impl UnwindSafe for AtomKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more