#[non_exhaustive]pub enum Ranking {
Coarse,
Exact,
}Expand description
How results are ordered.
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.
Coarse
By the weighted cost rounded up to whole units of 16
(whole_units), then higher weight, then lower term id. Terms whose
costs round to the same number of units are ordered by weight. This is
not a count of edits: the x1.5 factor on the first byte makes an
ordinary (non-neighbouring-key) edit there cost 24, i.e. two units,
while a neighbouring-key substitution there costs 12 (one unit) and a
transposition 18 (two units); two cheap edits (8 + 8) count as one.
Exact
By the exact weighted cost, then higher weight, then lower term id.
Trait Implementations§
impl Copy for Ranking
impl Eq for Ranking
impl StructuralPartialEq for Ranking
Auto Trait Implementations§
impl Freeze for Ranking
impl RefUnwindSafe for Ranking
impl Send for Ranking
impl Sync for Ranking
impl Unpin for Ranking
impl UnsafeUnpin for Ranking
impl UnwindSafe for Ranking
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