pub trait StorageBackend: Send + Sync {
// Required methods
fn load_index(&self, index_id: &str) -> Result<Vec<u8>>;
fn save_index(&mut self, index_id: &str, data: &[u8]) -> Result<()>;
fn delete_index(&mut self, index_id: &str) -> Result<()>;
fn exists(&self, index_id: &str) -> bool;
fn get_size(&self, index_id: &str) -> Result<u64>;
fn list_indices(&self) -> Result<Vec<String>>;
fn backend_type(&self) -> &'static str;
}Expand description
Storage backend trait for tier implementations
Required Methods§
Sourcefn delete_index(&mut self, index_id: &str) -> Result<()>
fn delete_index(&mut self, index_id: &str) -> Result<()>
Delete an index from storage
Sourcefn list_indices(&self) -> Result<Vec<String>>
fn list_indices(&self) -> Result<Vec<String>>
List all indices in this storage
Sourcefn backend_type(&self) -> &'static str
fn backend_type(&self) -> &'static str
Get storage backend type name