pub struct MeasuredString {
pub string: String,
pub distance: usize,
}
Expand description
Structure that associates a string with its Levenshtein distance from the query
Fields§
§string: String
§distance: usize
Trait Implementations§
Source§impl Clone for MeasuredString
impl Clone for MeasuredString
Source§fn clone(&self) -> MeasuredString
fn clone(&self) -> MeasuredString
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 moreSource§impl Debug for MeasuredString
impl Debug for MeasuredString
Source§impl Ord for MeasuredString
impl Ord for MeasuredString
Source§fn cmp(&self, other: &Self) -> Ordering
fn cmp(&self, other: &Self) -> Ordering
Compare the edit distances and then the strings for MeasuredString
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for MeasuredString
impl PartialEq for MeasuredString
Source§impl PartialOrd for MeasuredString
impl PartialOrd for MeasuredString
impl Eq for MeasuredString
impl StructuralPartialEq for MeasuredString
Auto Trait Implementations§
impl Freeze for MeasuredString
impl RefUnwindSafe for MeasuredString
impl Send for MeasuredString
impl Sync for MeasuredString
impl Unpin for MeasuredString
impl UnwindSafe for MeasuredString
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