pub enum Query<'a> {
Prefix(&'a str),
Fuzzy {
word: &'a str,
distance: u32,
},
}Expand description
Matching operates on normalized headwords; each visit receives every duplicate ID.
crate::Index uses NFC normalization, Unicode lowercasing, then trimming of
leading and trailing Unicode whitespace for both stored keys and queries.
Variants§
Prefix(&'a str)
Match every normalized key starting with this normalized prefix.
Fuzzy
Match normalized keys within a Unicode-scalar Levenshtein edit distance.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Query<'a>
impl<'a> RefUnwindSafe for Query<'a>
impl<'a> Send for Query<'a>
impl<'a> Sync for Query<'a>
impl<'a> Unpin for Query<'a>
impl<'a> UnsafeUnpin for Query<'a>
impl<'a> UnwindSafe for Query<'a>
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