#[non_exhaustive]pub struct Config {
pub normalize: bool,
pub ignore_case: bool,
pub prefer_prefix: bool,
/* private fields */
}
Expand description
Configuration data that controls how a matcher behaves
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.normalize: bool
Whether to normalize latin script characters to ASCII (enabled by default)
ignore_case: bool
whether to ignore casing
prefer_prefix: bool
Whether to provide a bonus to matches by their distance from the start of the haystack. The bonus is fairly small compared to the normal gap penalty to avoid messing with the normal score heuristic. This setting is not turned on by default and only recommended for autocompletion usecases where the expectation is that the user is typing the entire match. For a full fzf-like fuzzy matcher/picker word segmentation and explicit prefix literals should be used instead.
Implementations§
Source§impl Config
impl Config
Sourcepub fn set_match_paths(&mut self)
pub fn set_match_paths(&mut self)
Configures the matcher with bonuses appropriate for matching file paths.
Sourcepub const fn match_paths(self) -> Self
pub const fn match_paths(self) -> Self
Configures the matcher with bonuses appropriate for matching file paths.