pub struct SubstringMatcher;Expand description
match:substring. Returns lower score than prefix.
Trait Implementations§
Source§impl CandidateMatcher for SubstringMatcher
impl CandidateMatcher for SubstringMatcher
Source§fn matches(
&self,
query: &str,
candidate: &RawCandidate,
) -> Option<(MatchScore, Vec<Range<usize>>)>
fn matches( &self, query: &str, candidate: &RawCandidate, ) -> Option<(MatchScore, Vec<Range<usize>>)>
Score the candidate against
query. None means “no match”
(filter out). The byte ranges record which parts of
candidate.text the matcher consumed – the renderer paints
these with the match-face style.Auto Trait Implementations§
impl Freeze for SubstringMatcher
impl RefUnwindSafe for SubstringMatcher
impl Send for SubstringMatcher
impl Sync for SubstringMatcher
impl Unpin for SubstringMatcher
impl UnsafeUnpin for SubstringMatcher
impl UnwindSafe for SubstringMatcher
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