#[repr(u8)]pub enum MatchMode {
Exact,
Fuzzy(f64),
Both(f64),
}Expand description
Specifies mode for matching text in [match_text] function.
§Variants
MatchMode::Exact- tokens are matched for exact similarity.MatchMode::Fuzzy- tokens are matched fuzzily. This variant holds fuzzy match threshold asf64.MatchMode::Exact- tokens are matches for exact similarity, and if match failed, tokens are matched fuzzily. This variant holds fuzzy match threshold asf64.
§Note
Threshold should be in range of 0.0 and 1.0. Adjust threshold for your use case. Generally thresholds above 0.7-0.75 are fine, and generally you should use higher thresholds for smaller inputs.
Variants§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MatchMode
impl RefUnwindSafe for MatchMode
impl Send for MatchMode
impl Sync for MatchMode
impl Unpin for MatchMode
impl UnwindSafe for MatchMode
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