#[non_exhaustive]pub enum HighlightMode {
Whole,
Prefix,
}Expand description
Which search produced the hit.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Whole
A hit of Searcher::search or
Searcher::search_text: the
whole term is aligned with the query.
Prefix
A hit of Searcher::search_prefix
or Searcher::search_prefix_text:
the query is aligned with the shortest prefix of the term that attains
the hit’s cost, and the rest of the term is never highlighted.
Trait Implementations§
Source§impl Clone for HighlightMode
impl Clone for HighlightMode
Source§fn clone(&self) -> HighlightMode
fn clone(&self) -> HighlightMode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for HighlightMode
Source§impl Debug for HighlightMode
impl Debug for HighlightMode
Source§impl Default for HighlightMode
impl Default for HighlightMode
Source§fn default() -> HighlightMode
fn default() -> HighlightMode
Returns the “default value” for a type. Read more
impl Eq for HighlightMode
Source§impl Hash for HighlightMode
impl Hash for HighlightMode
Source§impl PartialEq for HighlightMode
impl PartialEq for HighlightMode
impl StructuralPartialEq for HighlightMode
Auto Trait Implementations§
impl Freeze for HighlightMode
impl RefUnwindSafe for HighlightMode
impl Send for HighlightMode
impl Sync for HighlightMode
impl Unpin for HighlightMode
impl UnsafeUnpin for HighlightMode
impl UnwindSafe for HighlightMode
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