pub struct Indexer { /* private fields */ }Expand description
The main indexing pipeline.
Coordinates directory walking, change detection, and parsing to produce a complete index of a codebase.
Implementations§
Source§impl Indexer
impl Indexer
Sourcepub fn with_change_detector(change_detector: ChangeDetector) -> Self
pub fn with_change_detector(change_detector: ChangeDetector) -> Self
Create a new Indexer with a pre-loaded ChangeDetector.
Sourcepub fn change_detector(&self) -> &ChangeDetector
pub fn change_detector(&self) -> &ChangeDetector
Get a reference to the change detector for persistence.
Sourcepub fn change_detector_mut(&mut self) -> &mut ChangeDetector
pub fn change_detector_mut(&mut self) -> &mut ChangeDetector
Get a mutable reference to the change detector.
Sourcepub fn index_directory(
&mut self,
root: &Path,
) -> Result<IndexResult, CodememError>
pub fn index_directory( &mut self, root: &Path, ) -> Result<IndexResult, CodememError>
Index a directory, returning all parse results.
Walks the directory respecting .gitignore rules (via the ignore crate),
filters by supported file extensions, checks incremental state, and parses
each changed file.
Sourcepub fn index_directory_with_progress(
&mut self,
root: &Path,
tx: Option<&Sender<IndexProgress>>,
) -> Result<IndexResult, CodememError>
pub fn index_directory_with_progress( &mut self, root: &Path, tx: Option<&Sender<IndexProgress>>, ) -> Result<IndexResult, CodememError>
Index a directory with optional progress reporting.
If a broadcast sender is provided, progress events are sent as files are processed. This is useful for SSE streaming to the frontend.
Sourcepub fn index_and_resolve(
&mut self,
root: &Path,
) -> Result<IndexAndResolveResult, CodememError>
pub fn index_and_resolve( &mut self, root: &Path, ) -> Result<IndexAndResolveResult, CodememError>
Index a directory, collect all symbols/references/chunks, and resolve references into graph edges.
This is the high-level entry point that combines index_directory()
with reference resolution — the common pipeline shared by the MCP
index_codebase tool and the CLI index command.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Indexer
impl RefUnwindSafe for Indexer
impl Send for Indexer
impl Sync for Indexer
impl Unpin for Indexer
impl UnsafeUnpin for Indexer
impl UnwindSafe 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
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>
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>
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