pub enum IndexEvent {
ScanStart {
total_sources: usize,
},
SourceStarted {
source_id: String,
},
FileParsed {
source_id: String,
path: String,
chunks: usize,
},
ModelDownloadStart {
role: ModelRole,
repo_id: String,
filename: String,
},
ModelDownloadComplete {
role: ModelRole,
elapsed_ms: u64,
},
EmbeddingBatch {
count: usize,
},
WritingStore,
SourceComplete {
source_id: String,
chunks: usize,
},
Complete {
files: usize,
chunks: usize,
files_skipped: usize,
files_removed: usize,
},
Error {
message: String,
},
}Expand description
Events emitted while building or rebuilding an index.
Consume these events via Indexer::index_file_stream,
Indexer::index_directory_stream, or the
Engine::index_stream family of methods.
Variants§
ScanStart
Indexing started; number of sources/files to process.
SourceStarted
A source is about to be indexed.
FileParsed
A file was parsed into chunks.
Fields
ModelDownloadStart
A model file needs downloading from the model hub (not yet cached). Emitted as the first events of a lazy index stream, before any retrieval of an already-built index happens.
Fields
ModelDownloadComplete
A model file download finished.
Fields
EmbeddingBatch
A batch of chunks is being embedded.
WritingStore
The index store is being written.
SourceComplete
A source finished indexing.
Fields
Complete
Indexing is complete.
Fields
Error
An error occurred.
Trait Implementations§
Source§impl Clone for IndexEvent
impl Clone for IndexEvent
Source§impl Debug for IndexEvent
impl Debug for IndexEvent
Source§impl<'de> Deserialize<'de> for IndexEvent
impl<'de> Deserialize<'de> for IndexEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for IndexEvent
impl PartialEq for IndexEvent
Source§impl Serialize for IndexEvent
impl Serialize for IndexEvent
impl StructuralPartialEq for IndexEvent
Auto Trait Implementations§
impl Freeze for IndexEvent
impl RefUnwindSafe for IndexEvent
impl Send for IndexEvent
impl Sync for IndexEvent
impl Unpin for IndexEvent
impl UnsafeUnpin for IndexEvent
impl UnwindSafe for IndexEvent
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