pub struct DiffMetrics {
pub len_ratio: f64,
pub dice: f64,
}Expand description
The two comparison metrics.
Length is the UTF-8 byte length of the normalized comparison text. That unit is the contract, because changing it would silently move verdicts near the thresholds.
Fields§
§len_ratio: f64Normalized length ratio, shorter over longer, 1.0 when equal.
dice: f64Dice coefficient over token multisets.
Trait Implementations§
Source§impl Clone for DiffMetrics
impl Clone for DiffMetrics
Source§fn clone(&self) -> DiffMetrics
fn clone(&self) -> DiffMetrics
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 DiffMetrics
Source§impl Debug for DiffMetrics
impl Debug for DiffMetrics
Source§impl PartialEq for DiffMetrics
impl PartialEq for DiffMetrics
impl StructuralPartialEq for DiffMetrics
Auto Trait Implementations§
impl Freeze for DiffMetrics
impl RefUnwindSafe for DiffMetrics
impl Send for DiffMetrics
impl Sync for DiffMetrics
impl Unpin for DiffMetrics
impl UnsafeUnpin for DiffMetrics
impl UnwindSafe for DiffMetrics
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more