pub struct ProjectSearcher { /* private fields */ }Expand description
Project fuzzy searcher with integrated frecency ranking
Implementations§
Source§impl ProjectSearcher
impl ProjectSearcher
Sourcepub fn search<'a>(
&self,
projects: &'a [Project],
query: &str,
) -> Vec<&'a Project>
pub fn search<'a>( &self, projects: &'a [Project], query: &str, ) -> Vec<&'a Project>
Search projects by fuzzy matching name/path
Returns projects sorted by combined fuzzy match score + frecency.
The ranking formula is:
- Fuzzy match score (0-100): how well the query matches the project
- Frecency score (0-∞): how frequently and recently the project was accessed
- Combined: fuzzy_score * 0.7 + frecency_score * 0.3
This prioritizes good matches while still surfacing frequently-used projects.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ProjectSearcher
impl RefUnwindSafe for ProjectSearcher
impl Send for ProjectSearcher
impl Sync for ProjectSearcher
impl Unpin for ProjectSearcher
impl UnwindSafe for ProjectSearcher
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> 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