pub struct IncrementalIndexer { /* private fields */ }Expand description
Orchestrates the differ and parser to produce a GraphDiff from
last_sha..HEAD. Stateless — callers own the repo root and last SHA.
Implementations§
Source§impl IncrementalIndexer
impl IncrementalIndexer
Sourcepub fn new(repo_root: &Path) -> Result<Self>
pub fn new(repo_root: &Path) -> Result<Self>
Build an indexer rooted at repo_root.
Reads .gitcortex/ignore (if present) for exclusion patterns.
Sourcepub fn run(&self, from_sha: Option<&str>) -> Result<(GraphDiff, String)>
pub fn run(&self, from_sha: Option<&str>) -> Result<(GraphDiff, String)>
Run an incremental index from from_sha (exclusive) to HEAD.
Returns:
GraphDiff— changes to apply to the storeString— the HEAD SHA to persist aslast_indexed_sha
When from_sha is None the entire HEAD tree is indexed (first run).
Auto Trait Implementations§
impl Freeze for IncrementalIndexer
impl RefUnwindSafe for IncrementalIndexer
impl Send for IncrementalIndexer
impl Sync for IncrementalIndexer
impl Unpin for IncrementalIndexer
impl UnsafeUnpin for IncrementalIndexer
impl UnwindSafe for IncrementalIndexer
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> 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