Enum nucleo_matcher::pattern::AtomKind
source · #[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
.