pub struct Indexer {
pub db: Database,
/* private fields */
}Expand description
Indexer for building the code intelligence database.
Fields§
§db: DatabaseThe database connection (pub for watch mode access).
Implementations§
Source§impl Indexer
impl Indexer
Sourcepub fn with_config(
root: &Path,
verbose: bool,
walker_config: WalkerConfig,
) -> Result<Self>
pub fn with_config( root: &Path, verbose: bool, walker_config: WalkerConfig, ) -> Result<Self>
Create a new indexer with custom walker configuration.
Sourcepub fn new_in_memory(root: &Path) -> Result<Self>
pub fn new_in_memory(root: &Path) -> Result<Self>
Create an indexer with an in-memory database (for testing).
Sourcepub fn index(&mut self) -> Result<IndexResult>
pub fn index(&mut self) -> Result<IndexResult>
Index the codebase.
Sourcepub fn index_parallel(&mut self) -> Result<IndexResult>
pub fn index_parallel(&mut self) -> Result<IndexResult>
Index the codebase using parallel parsing.
This method uses rayon to parse files in parallel, then batch-inserts the results into the database. This is significantly faster for large codebases on multi-core systems.
Sourcepub fn index_file(&mut self, path: &Path) -> Result<bool>
pub fn index_file(&mut self, path: &Path) -> Result<bool>
Index a single file.
Auto Trait Implementations§
impl !Freeze for Indexer
impl !RefUnwindSafe for Indexer
impl !Sync for Indexer
impl !UnwindSafe for Indexer
impl Send for Indexer
impl Unpin for Indexer
impl UnsafeUnpin for Indexer
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> 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