Struct group_similar::Config
source · pub struct Config<V> {
pub compare: Box<dyn Fn(&V, &V) -> f64 + Send + Sync>,
/* private fields */
}
Expand description
Config
manages grouping configuration based on three settings (managed internally);
threshold
, method
, and compare
.
threshold
captures how strict or permissive the comparison is.
method
represents the dendrogram linkage method, and (at least for Jaro-Winkler) should
be set to Method::Complete
.
Finally, compare
is the closure used to determine how similar two values are to each other.
For string-based comparisons, we make available Jaro-Winkler. This closure must be idempotent.
Fields§
§compare: Box<dyn Fn(&V, &V) -> f64 + Send + Sync>
A closure that takes two values and returns a float between 0.0 and 1.0
Implementations§
Auto Trait Implementations§
impl<V> !RefUnwindSafe for Config<V>
impl<V> Send for Config<V>
impl<V> Sync for Config<V>
impl<V> Unpin for Config<V>
impl<V> !UnwindSafe for Config<V>
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