pub struct FuzzyMatcher<T: Searchable + Send + Sync + 'static> { /* private fields */ }Implementations§
Source§impl<T: Searchable + Send + Sync + 'static> FuzzyMatcher<T>
impl<T: Searchable + Send + Sync + 'static> FuzzyMatcher<T>
pub fn new(items: Vec<T>) -> Self
Sourcepub fn from_matches(matches: Vec<T>) -> Self
pub fn from_matches(matches: Vec<T>) -> Self
Creates a FuzzyMatcher with pre-populated matches (no Nucleo indexing).
pub fn query(&self) -> &str
pub fn matches(&self) -> &[T]
pub fn is_empty(&self) -> bool
pub fn set_match_sort(&mut self, sort: fn(&T, &T) -> Ordering)
pub fn push_query_char(&mut self, c: char)
pub fn pop_query_char(&mut self) -> bool
Sourcepub fn refresh_matches(&mut self, append: bool)
pub fn refresh_matches(&mut self, append: bool)
Re-runs the search and updates the stored matches. Returns true if the match count changed (callers may need to clamp selection indices).
Auto Trait Implementations§
impl<T> Freeze for FuzzyMatcher<T>
impl<T> !RefUnwindSafe for FuzzyMatcher<T>
impl<T> Send for FuzzyMatcher<T>
impl<T> Sync for FuzzyMatcher<T>
impl<T> Unpin for FuzzyMatcher<T>where
T: Unpin,
impl<T> UnsafeUnpin for FuzzyMatcher<T>
impl<T> !UnwindSafe for FuzzyMatcher<T>
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
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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