pub enum Algorithm {
JaroWinkler,
Levenshtein,
DamerauLevenshtein,
}Expand description
Algorithm for similarity calculation
Variants§
JaroWinkler
Jaro-Winkler similarity (recommended for typos)
Good for: transpositions, prefix matching Returns: 0.0 to 1.0 (1.0 = identical)
Levenshtein
Levenshtein distance (edit distance)
Good for: insertions, deletions, substitutions Normalized to 0.0 to 1.0 (1.0 = identical)
DamerauLevenshtein
Damerau-Levenshtein distance
Like Levenshtein but also handles transpositions Normalized to 0.0 to 1.0 (1.0 = identical)
Trait Implementations§
impl Copy for Algorithm
impl Eq for Algorithm
impl StructuralPartialEq for Algorithm
Auto Trait Implementations§
impl Freeze for Algorithm
impl RefUnwindSafe for Algorithm
impl Send for Algorithm
impl Sync for Algorithm
impl Unpin for Algorithm
impl UnwindSafe for Algorithm
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