pub struct GrepSearchOptions {
pub max_file_size: u64,
pub max_matches_per_file: usize,
pub smart_case: bool,
pub file_offset: usize,
pub page_limit: usize,
pub mode: GrepMode,
pub time_budget_ms: u64,
pub before_context: usize,
pub after_context: usize,
pub classify_definitions: bool,
}Expand description
Options for grep search.
Fields§
§max_file_size: u64§max_matches_per_file: usize§smart_case: bool§file_offset: usizeFile-based pagination offset: index into the sorted/filtered file list
to start searching from. Pass 0 for the first page, then use
GrepResult::next_file_offset for subsequent pages.
page_limit: usizeMaximum number of matches to collect before stopping.
mode: GrepModeHow to interpret the search pattern. Defaults to PlainText.
time_budget_ms: u64Maximum time in milliseconds to spend searching before returning partial results. Prevents UI freezes on pathological queries. 0 = no limit.
before_context: usizeNumber of context lines to include before each match. 0 = disabled.
after_context: usizeNumber of context lines to include after each match. 0 = disabled.
classify_definitions: boolWhether to classify each match as a definition line. Adds ~2% overhead on large repos; disable for interactive grep where it is not needed.
Trait Implementations§
Source§impl Clone for GrepSearchOptions
impl Clone for GrepSearchOptions
Source§fn clone(&self) -> GrepSearchOptions
fn clone(&self) -> GrepSearchOptions
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 moreAuto Trait Implementations§
impl Freeze for GrepSearchOptions
impl RefUnwindSafe for GrepSearchOptions
impl Send for GrepSearchOptions
impl Sync for GrepSearchOptions
impl Unpin for GrepSearchOptions
impl UnsafeUnpin for GrepSearchOptions
impl UnwindSafe for GrepSearchOptions
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