Skip to main content

ContextStoreApi

Trait ContextStoreApi 

Source
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§

Source

fn add( &mut self, records: &[AddRecordRequest], ) -> impl Future<Output = ContextResult<AddRecordsResponse>> + Send

Source

fn get( &self, id: &str, ) -> impl Future<Output = ContextResult<Option<RecordDto>>> + Send

Source

fn list( &self, limit: Option<usize>, offset: Option<usize>, ) -> impl Future<Output = ContextResult<Vec<RecordDto>>> + Send

Source

fn search( &self, query: &[f32], limit: Option<usize>, ) -> impl Future<Output = ContextResult<Vec<SearchResultDto>>> + Send

Source

fn version(&self) -> u64

Source

fn checkout( &mut self, version: u64, ) -> impl Future<Output = ContextResult<()>> + Send

Source

fn compact( &mut self, options: Option<CompactRequest>, ) -> impl Future<Output = ContextResult<CompactResponse>> + Send

Source

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".

Implementors§