#[non_exhaustive]pub enum HighlightError {
QueryTooLong {
len: usize,
max: usize,
},
UnknownTerm {
id: u32,
},
SourceMismatch,
CostMismatch {
expected: Cost,
found: Option<Cost>,
},
}Expand description
Why a hit could not be highlighted.
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.
QueryTooLong
The query is longer than MAX_QUERY_LEN.
Fields
UnknownTerm
The hit’s id is not a term of this trie.
SourceMismatch
The source string does not normalise (with the trie’s normaliser, if any) to the hit’s term.
CostMismatch
The alignment of this query and term does not cost what the hit says: the hit comes from another query, cost model, trie or mode.
Trait Implementations§
Source§impl Clone for HighlightError
impl Clone for HighlightError
Source§fn clone(&self) -> HighlightError
fn clone(&self) -> HighlightError
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 HighlightError
Source§impl Debug for HighlightError
impl Debug for HighlightError
Source§impl Display for HighlightError
impl Display for HighlightError
impl Eq for HighlightError
Source§impl PartialEq for HighlightError
impl PartialEq for HighlightError
impl StructuralPartialEq for HighlightError
Auto Trait Implementations§
impl Freeze for HighlightError
impl RefUnwindSafe for HighlightError
impl Send for HighlightError
impl Sync for HighlightError
impl Unpin for HighlightError
impl UnsafeUnpin for HighlightError
impl UnwindSafe for HighlightError
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