pub enum Matching {
Fuzzy,
Exact,
Prefix,
Suffix,
Substring,
}Expand description
Selects the matching algorithm
Matching::Fuzzy uses the Smith-Waterman algorithm with typos, gaps and
substitutions (default) Matching::Exact matches the haystack exactly
Matching::Prefix matches the haystack if it starts with the needle
Matching::Suffix matches the haystack if it ends with the needle
Matching::Substring matches the haystack if it contains the needle
Only the Matching::Fuzzy mode supports typos
Variants§
Fuzzy
Smith-Waterman fuzzy matching with typos, gaps and substitutions (default)
Exact
The haystack must equal the needle
Prefix
The haystack must start with the needle
Suffix
The haystack must end with the needle
Substring
The needle must appear somewhere in the haystack. When it appears more than once, the highest-scoring occurrence is used, preferring earlier matches on tie