free_launch/response.rs
1use crate::{config::SearchProvider, search_index::ItemVec, search_metadata::SearchMetadata};
2
3#[derive(Debug)]
4pub enum IndexingStatus {
5 Preparing,
6 Indexing { indexed: usize, total: usize },
7 Done,
8}
9
10/// An enum to return data back to the GUI from the `SearchIndex`
11pub enum Response {
12 IndexMetadata {
13 metadata: SearchMetadata,
14 },
15 SearchProviders {
16 providers: Vec<SearchProvider>,
17 },
18 SearchResults {
19 id: usize,
20 results: ItemVec,
21 // this seems redundant with `results.len()` but it should be the total number of matched items, where results is shrunk to fit the area available on screen
22 matches: u32,
23 total_items: u32,
24 },
25}