pub trait Distance {
// Required method
fn distance(&self, other: &Self) -> u64;
}Expand description
This trait used by BKTree to tell how close are 2 objects when fuzzy searching. In case of strings, the distance function could be something like Levenshtein distance, Damerau–Levenshtein distance, Optimal string alignment distance or anything similar.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.