pub enum GrepMode {
PlainText,
Regex,
Fuzzy,
}Expand description
Controls how the grep pattern is interpreted.
Variants§
PlainText
Default mode: the query is treated as literal text.
The pattern is searched using SIMD-accelerated memchr::memmem.
Special regex characters in the query have no special meaning.
Regex
Regex mode: the query is treated as a regular expression.
Uses the same grep-matcher / regex::bytes::Regex engine.
Invalid regex patterns will return zero results (not an error).
Fuzzy
Fuzzy mode: the query is treated as a fuzzy needle matched against each line using neo_frizbee’s Smith-Waterman scoring. Lines are ranked by match score. Individual matched character positions are reported as highlight ranges.
Trait Implementations§
impl Copy for GrepMode
impl Eq for GrepMode
impl StructuralPartialEq for GrepMode
Auto Trait Implementations§
impl Freeze for GrepMode
impl RefUnwindSafe for GrepMode
impl Send for GrepMode
impl Sync for GrepMode
impl Unpin for GrepMode
impl UnsafeUnpin for GrepMode
impl UnwindSafe for GrepMode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more