pub enum Fuzziness {
Edits(u8),
Detailed(FuzzyLimits),
MrabStyle(MrabFuzziness),
Inherited,
Exact,
}Expand description
Fuzziness specification for a literal segment.
Supports two syntax styles:
- Simple:
hello~2(allows 2 total edits) - mrab-style:
(?:hello){i<=1,d<=2}(max 1 insertion, 2 deletions)
Variants§
Edits(u8)
Simple edit count: hello~2 allows 2 total edits.
Detailed(FuzzyLimits)
Detailed limits: hello~{i=1,d=0,s=2} or mrab-style {i<=1,d<=2}.
MrabStyle(MrabFuzziness)
mrab-style specification with optional cost constraints.
{i<=1,s<=2,2i+2d+1s<=4}
Inherited
Inherit from global/parent settings.
Exact
Exact match only (no fuzzy matching): hello~0.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Fuzziness
Auto Trait Implementations§
impl Freeze for Fuzziness
impl RefUnwindSafe for Fuzziness
impl Send for Fuzziness
impl Sync for Fuzziness
impl Unpin for Fuzziness
impl UnsafeUnpin for Fuzziness
impl UnwindSafe for Fuzziness
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