pub struct Config {
pub n_threads: Option<usize>,
pub ignore_case: bool,
pub prefer_prefix: bool,
pub match_paths: bool,
}
Expand description
The configuration of the fuzzy matcher.
This contains the number of threads to use, whether to ignore case, whether to prefer prefix matches, and whether to optimize for matching paths.
The default configuration uses the default configuration of the Nucleo
fuzzy matcher, e.g. case-insensitive matching, no preference for prefix
matches, and no optimization for matching paths as well as using the
default number of threads (which corresponds to the number of available logical
cores on the current machine).
Fields§
§n_threads: Option<usize>
The number of threads to use for the fuzzy matcher.
ignore_case: bool
Whether to ignore case when matching.
prefer_prefix: bool
Whether to prefer prefix matches.
match_paths: bool
Whether to optimize for matching paths.
Implementations§
Source§impl Config
impl Config
Sourcepub fn ignore_case(self, ignore_case: bool) -> Self
pub fn ignore_case(self, ignore_case: bool) -> Self
Set whether to ignore case.
Sourcepub fn prefer_prefix(self, prefer_prefix: bool) -> Self
pub fn prefer_prefix(self, prefer_prefix: bool) -> Self
Set whether to prefer prefix matches.
Sourcepub fn match_paths(self, match_paths: bool) -> Self
pub fn match_paths(self, match_paths: bool) -> Self
Set whether to optimize for matching paths.
Trait Implementations§
impl Copy for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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