pub struct GrepResult<'a> {
pub matches: Vec<GrepMatch>,
pub files: Vec<&'a FileItem>,
pub total_files_searched: usize,
pub total_files: usize,
pub filtered_file_count: usize,
pub files_with_matches: usize,
pub next_file_offset: usize,
pub regex_fallback_error: Option<String>,
}Expand description
Result of a grep search.
Fields§
§matches: Vec<GrepMatch>§files: Vec<&'a FileItem>Deduplicated file references for the returned matches.
total_files_searched: usizeNumber of files actually searched in this call.
total_files: usizeTotal number of indexed files (before filtering).
filtered_file_count: usizeTotal number of searchable files (after filtering out binary, too-large, etc.).
files_with_matches: usizeNumber of files that contained at least one match.
next_file_offset: usizeThe file offset to pass for the next page. 0 if there are no more files.
Callers should store this and pass it as file_offset in the next call.
regex_fallback_error: Option<String>When regex mode fails to compile the pattern, the search falls back to literal matching and this field contains the compilation error message. The UI can display this to inform the user their regex was invalid.
Trait Implementations§
Source§impl<'a> Clone for GrepResult<'a>
impl<'a> Clone for GrepResult<'a>
Source§fn clone(&self) -> GrepResult<'a>
fn clone(&self) -> GrepResult<'a>
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 moreSource§impl<'a> Debug for GrepResult<'a>
impl<'a> Debug for GrepResult<'a>
Source§impl<'a> Default for GrepResult<'a>
impl<'a> Default for GrepResult<'a>
Source§fn default() -> GrepResult<'a>
fn default() -> GrepResult<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for GrepResult<'a>
impl<'a> RefUnwindSafe for GrepResult<'a>
impl<'a> Send for GrepResult<'a>
impl<'a> Sync for GrepResult<'a>
impl<'a> Unpin for GrepResult<'a>
impl<'a> UnsafeUnpin for GrepResult<'a>
impl<'a> UnwindSafe for GrepResult<'a>
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