pub struct GrepExecutor<'a> { /* private fields */ }Expand description
The grep executor: plans and runs regex search over a TrigramIndex.
Implementations§
Source§impl<'a> GrepExecutor<'a>
impl<'a> GrepExecutor<'a>
Sourcepub fn new(index: &'a TrigramIndex) -> Self
pub fn new(index: &'a TrigramIndex) -> Self
Create an executor over index with the default scan budget.
Sourcepub fn with_max_scan(self, max_scan: usize) -> Self
pub fn with_max_scan(self, max_scan: usize) -> Self
Override the full-scan document budget for degenerate patterns.
Sourcepub fn search(
&self,
pattern: &str,
allowed: &AllowedSet,
limit: usize,
mode: GrepMode,
) -> Result<GrepResults, GrepError>
pub fn search( &self, pattern: &str, allowed: &AllowedSet, limit: usize, mode: GrepMode, ) -> Result<GrepResults, GrepError>
Run a grep search.
allowed is applied as a pushdown filter before regex verification,
preserving the same result ⊆ allowed invariant the other lanes honor.
limit caps the number of returned hits (0 = unlimited).
Auto Trait Implementations§
impl<'a> Freeze for GrepExecutor<'a>
impl<'a> RefUnwindSafe for GrepExecutor<'a>
impl<'a> Send for GrepExecutor<'a>
impl<'a> Sync for GrepExecutor<'a>
impl<'a> Unpin for GrepExecutor<'a>
impl<'a> UnsafeUnpin for GrepExecutor<'a>
impl<'a> UnwindSafe for GrepExecutor<'a>
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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