pub struct DamLevMatch {
pub start: usize,
pub end: usize,
pub insertions: u8,
pub deletions: u8,
pub substitutions: u8,
pub swaps: u8,
pub similarity: f32,
}Expand description
A match found by the DamLev automaton.
Fields§
§start: usizeStart position of the match (byte offset, inclusive).
end: usizeEnd position of the match (byte offset, exclusive).
insertions: u8Number of insertion edits in this match.
deletions: u8Number of deletion edits in this match.
substitutions: u8Number of substitution edits in this match.
swaps: u8Number of transposition edits in this match.
similarity: f32Similarity score (0.0 to 1.0).
Implementations§
Source§impl DamLevMatch
impl DamLevMatch
Sourcepub fn total_edits(&self) -> u8
pub fn total_edits(&self) -> u8
Returns the total number of edit operations in this match.
Trait Implementations§
Source§impl Clone for DamLevMatch
impl Clone for DamLevMatch
Source§fn clone(&self) -> DamLevMatch
fn clone(&self) -> DamLevMatch
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DamLevMatch
impl RefUnwindSafe for DamLevMatch
impl Send for DamLevMatch
impl Sync for DamLevMatch
impl Unpin for DamLevMatch
impl UnsafeUnpin for DamLevMatch
impl UnwindSafe for DamLevMatch
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