pub trait IndexStorage: Send + Sync {
// Required methods
fn save_index<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 NamespaceId,
index_type: IndexType,
data: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn load_index<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 NamespaceId,
index_type: IndexType,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete_index<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 NamespaceId,
index_type: IndexType,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn index_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 NamespaceId,
index_type: IndexType,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_indexes<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 NamespaceId,
) -> Pin<Box<dyn Future<Output = Result<Vec<IndexType>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Storage trait for persisting index data
Required Methods§
Sourcefn save_index<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 NamespaceId,
index_type: IndexType,
data: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_index<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 NamespaceId,
index_type: IndexType,
data: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Save index data for a namespace
Sourcefn load_index<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 NamespaceId,
index_type: IndexType,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_index<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 NamespaceId,
index_type: IndexType,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load index data for a namespace
Sourcefn delete_index<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 NamespaceId,
index_type: IndexType,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_index<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 NamespaceId,
index_type: IndexType,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete index data for a namespace
Sourcefn index_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 NamespaceId,
index_type: IndexType,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn index_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 NamespaceId,
index_type: IndexType,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check if index exists for a namespace
Sourcefn list_indexes<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 NamespaceId,
) -> Pin<Box<dyn Future<Output = Result<Vec<IndexType>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_indexes<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 NamespaceId,
) -> Pin<Box<dyn Future<Output = Result<Vec<IndexType>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List all indexes for a namespace
Implementations on Foreign Types§
Source§impl<T: IndexStorage + ?Sized> IndexStorage for Arc<T>
Blanket implementation for Arc
impl<T: IndexStorage + ?Sized> IndexStorage for Arc<T>
Blanket implementation for Arc