pub trait ContextStoreApi {
// Required methods
fn add(
&mut self,
records: &[AddRecordRequest],
) -> impl Future<Output = ContextResult<AddRecordsResponse>> + Send;
fn get(
&self,
id: &str,
) -> impl Future<Output = ContextResult<Option<RecordDto>>> + Send;
fn list(
&self,
limit: Option<usize>,
offset: Option<usize>,
) -> impl Future<Output = ContextResult<Vec<RecordDto>>> + Send;
fn search(
&self,
query: &[f32],
limit: Option<usize>,
) -> impl Future<Output = ContextResult<Vec<SearchResultDto>>> + Send;
fn version(&self) -> u64;
fn checkout(
&mut self,
version: u64,
) -> impl Future<Output = ContextResult<()>> + Send;
fn compact(
&mut self,
options: Option<CompactRequest>,
) -> impl Future<Output = ContextResult<CompactResponse>> + Send;
fn compaction_stats(
&self,
) -> impl Future<Output = ContextResult<CompactStatsResponse>> + Send;
}Required Methods§
fn add( &mut self, records: &[AddRecordRequest], ) -> impl Future<Output = ContextResult<AddRecordsResponse>> + Send
fn get( &self, id: &str, ) -> impl Future<Output = ContextResult<Option<RecordDto>>> + Send
fn list( &self, limit: Option<usize>, offset: Option<usize>, ) -> impl Future<Output = ContextResult<Vec<RecordDto>>> + Send
fn search( &self, query: &[f32], limit: Option<usize>, ) -> impl Future<Output = ContextResult<Vec<SearchResultDto>>> + Send
fn version(&self) -> u64
fn checkout( &mut self, version: u64, ) -> impl Future<Output = ContextResult<()>> + Send
fn compact( &mut self, options: Option<CompactRequest>, ) -> impl Future<Output = ContextResult<CompactResponse>> + Send
fn compaction_stats( &self, ) -> impl Future<Output = ContextResult<CompactStatsResponse>> + Send
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".