use std::path::PathBuf; use tokio::sync::oneshot; use uuid::Uuid; use crate::index::{Checked, Document, SearchQuery, SearchResult, Settings}; use crate::index_controller::{Failed, IndexStats, Processed, Processing}; use super::{IndexMeta, IndexResult, IndexSettings}; #[allow(clippy::large_enum_variant)] pub enum IndexMsg { CreateIndex { uuid: Uuid, primary_key: Option, ret: oneshot::Sender>, }, Update { uuid: Uuid, meta: Processing, data: Option, ret: oneshot::Sender>>, }, Search { uuid: Uuid, query: SearchQuery, ret: oneshot::Sender>, }, Settings { uuid: Uuid, ret: oneshot::Sender>>, }, Documents { uuid: Uuid, attributes_to_retrieve: Option>, offset: usize, limit: usize, ret: oneshot::Sender>>, }, Document { uuid: Uuid, attributes_to_retrieve: Option>, doc_id: String, ret: oneshot::Sender>, }, Delete { uuid: Uuid, ret: oneshot::Sender>, }, GetMeta { uuid: Uuid, ret: oneshot::Sender>, }, UpdateIndex { uuid: Uuid, index_settings: IndexSettings, ret: oneshot::Sender>, }, Snapshot { uuid: Uuid, path: PathBuf, ret: oneshot::Sender>, }, Dump { uuid: Uuid, path: PathBuf, ret: oneshot::Sender>, }, GetStats { uuid: Uuid, ret: oneshot::Sender>, }, }