pub struct TrigramGrepCandidateIndex { /* private fields */ }Expand description
In-memory trigram → file-id postings used only to prune grep paths.
Implementations§
Source§impl TrigramGrepCandidateIndex
impl TrigramGrepCandidateIndex
Sourcepub fn default_index_dir(root: &Path) -> PathBuf
pub fn default_index_dir(root: &Path) -> PathBuf
Default on-disk stamp location under a workspace root.
Sourcepub fn build_from_files(
root: &Path,
index_dir: &Path,
files: &[PathBuf],
) -> Result<Self, TrigramGrepCandidateIndexError>
pub fn build_from_files( root: &Path, index_dir: &Path, files: &[PathBuf], ) -> Result<Self, TrigramGrepCandidateIndexError>
Build an index for files under root and write a stamp under index_dir.
files must be absolute paths that live under root. Relative paths
stored in the index use / separators to match workspace normalization.
Sourcepub fn build_from_relative_paths(
root: &Path,
index_dir: &Path,
relative_paths: &[String],
) -> Result<Self, TrigramGrepCandidateIndexError>
pub fn build_from_relative_paths( root: &Path, index_dir: &Path, relative_paths: &[String], ) -> Result<Self, TrigramGrepCandidateIndexError>
Build from workspace-relative paths joined under root.
Trait Implementations§
Source§impl GrepCandidateIndex for TrigramGrepCandidateIndex
impl GrepCandidateIndex for TrigramGrepCandidateIndex
Source§fn select_paths(
&self,
pattern: &str,
case_insensitive: bool,
) -> GrepCandidateSelection
fn select_paths( &self, pattern: &str, case_insensitive: bool, ) -> GrepCandidateSelection
Select candidate relative paths for
pattern. Read moreAuto Trait Implementations§
impl Freeze for TrigramGrepCandidateIndex
impl RefUnwindSafe for TrigramGrepCandidateIndex
impl Send for TrigramGrepCandidateIndex
impl Sync for TrigramGrepCandidateIndex
impl Unpin for TrigramGrepCandidateIndex
impl UnsafeUnpin for TrigramGrepCandidateIndex
impl UnwindSafe for TrigramGrepCandidateIndex
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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