pub fn fuzzy_match_rank_with_matcher(
name: &str,
query: &str,
matcher: &SkimMatcherV2,
) -> Option<i64>Expand description
Rank how well a package name matches a query using fuzzy matching (fzf-style) with a provided matcher.
Inputs:
name: Package name to match againstquery: Query string to matchmatcher: Reference to aSkimMatcherV2instance to reuse across multiple calls
Output:
Some(score)if the query matches the name (higher score = better match),Noneif no match
Details:
- Uses the provided
fuzzy_matcher::skim::SkimMatcherV2for fzf-style fuzzy matching - Returns scores where higher values indicate better matches
- Returns
Nonewhen the query doesn’t match at all - This function is optimized for cases where the matcher can be reused across multiple calls