pub trait IndexStorage: Send + Sync {
// Required methods
fn init(&self, index_dir: &Path) -> Result<()>;
fn persist(&self, index_dir: &Path, entry: &FileIndex) -> Result<()>;
// Provided method
fn persist_batch(
&self,
index_dir: &Path,
entries: &[FileIndex],
) -> Result<()> { ... }
}Expand description
Persistence backend for SimpleIndexer.
Required Methods§
Provided Methods§
Sourcefn persist_batch(&self, index_dir: &Path, entries: &[FileIndex]) -> Result<()>
fn persist_batch(&self, index_dir: &Path, entries: &[FileIndex]) -> Result<()>
Persist a batch of indexed file entries.
Defaults to calling IndexStorage::persist for each entry, keeping
existing custom storage backends compatible.