pub struct Suggestion {
pub word: String,
pub edit_distance: u8,
pub soundex_match: bool,
pub freq_score: u32,
}Expand description
A spelling suggestion returned by SpellChecker::suggestions.
Suggestions are sorted by:
soundex_matchdescending — phonetically similar words firstedit_distanceascending — closer edits firstfreq_scoredescending — more common words first
Fields§
§word: StringCandidate word from the built-in dictionary.
edit_distance: u8Levenshtein edit distance between the input and this candidate.
soundex_match: booltrue if the lk82 phonetic codes of the input and candidate match.
freq_score: u32TNC frequency score; 0 if the word is not in the frequency table.
Trait Implementations§
Source§impl Clone for Suggestion
impl Clone for Suggestion
Source§fn clone(&self) -> Suggestion
fn clone(&self) -> Suggestion
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 Suggestion
impl Debug for Suggestion
Source§impl PartialEq for Suggestion
impl PartialEq for Suggestion
impl Eq for Suggestion
impl StructuralPartialEq for Suggestion
Auto Trait Implementations§
impl Freeze for Suggestion
impl RefUnwindSafe for Suggestion
impl Send for Suggestion
impl Sync for Suggestion
impl Unpin for Suggestion
impl UnsafeUnpin for Suggestion
impl UnwindSafe for Suggestion
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