pub enum SearchEvent {
ModelDownloadStart {
role: ModelRole,
repo_id: String,
filename: String,
},
ModelDownloadComplete {
role: ModelRole,
elapsed_ms: u64,
},
StageStarted {
stage: SearchStage,
},
StageFinished {
stage: SearchStage,
elapsed_ms: u64,
},
Completed {
hits: Vec<SearchHit>,
stats: SearchStats,
},
}Expand description
Streaming events emitted by the hybrid search pipeline, in order.
The stream ends after Completed or when the underlying future returns Err.
Variants§
ModelDownloadStart
A model file needs downloading from the model hub (not yet cached). Emitted as the first events of a lazy search stream.
Fields
ModelDownloadComplete
A model file download finished.
Fields
StageStarted
A pipeline stage started — for progress display.
Fields
§
stage: SearchStageStageFinished
A pipeline stage finished — carries the stage duration.
Completed
Retrieval finished: final ranked hits. Also the terminal event.
Trait Implementations§
Source§impl Clone for SearchEvent
impl Clone for SearchEvent
Source§impl Debug for SearchEvent
impl Debug for SearchEvent
Source§impl<'de> Deserialize<'de> for SearchEvent
impl<'de> Deserialize<'de> for SearchEvent
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
Auto Trait Implementations§
impl Forget for SearchEvent
impl Freeze for SearchEvent
impl Move for SearchEvent
impl RefUnwindSafe for SearchEvent
impl Send for SearchEvent
impl Sync for SearchEvent
impl Unpin for SearchEvent
impl UnsafeUnpin for SearchEvent
impl UnwindSafe for SearchEvent
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