Skip to main content

ContextStoreApi

Trait ContextStoreApi 

Source
pub trait ContextStoreApi {
Show 15 methods // Required methods fn add( &mut self, records: &[AddRecordRequest], ) -> impl Future<Output = ContextResult<AddRecordsResponse>> + Send; fn upsert( &mut self, request: &UpsertRecordRequest, ) -> impl Future<Output = ContextResult<UpsertRecordResponse>> + Send; fn update( &mut self, request: &UpdateRecordRequest, ) -> impl Future<Output = ContextResult<UpdateRecordResponse>> + Send; fn get( &self, id: &str, ) -> impl Future<Output = ContextResult<Option<RecordDto>>> + Send; fn get_by_external_id( &self, external_id: &str, ) -> impl Future<Output = ContextResult<Option<RecordDto>>> + Send; fn delete_by_id( &mut self, id: &str, ) -> impl Future<Output = ContextResult<DeleteRecordResponse>> + Send; fn delete_by_external_id( &mut self, external_id: &str, ) -> impl Future<Output = ContextResult<DeleteRecordResponse>> + Send; fn list( &self, limit: Option<usize>, offset: Option<usize>, filters: Option<Value>, include_expired: bool, include_retired: bool, ) -> impl Future<Output = ContextResult<Vec<RecordDto>>> + Send; fn related( &self, target_id: &str, relation: Option<&str>, limit: Option<usize>, include_expired: bool, include_retired: bool, ) -> impl Future<Output = ContextResult<Vec<RecordDto>>> + Send; fn search( &self, request: &SearchRequest, ) -> impl Future<Output = ContextResult<Vec<SearchResultDto>>> + Send; fn retrieve( &self, request: &RetrieveRequest, ) -> impl Future<Output = ContextResult<Vec<RetrieveResultDto>>> + 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 upsert( &mut self, request: &UpsertRecordRequest, ) -> impl Future<Output = ContextResult<UpsertRecordResponse>> + Send

Source

fn update( &mut self, request: &UpdateRecordRequest, ) -> impl Future<Output = ContextResult<UpdateRecordResponse>> + Send

Source

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

Source

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

Source

fn delete_by_id( &mut self, id: &str, ) -> impl Future<Output = ContextResult<DeleteRecordResponse>> + Send

Source

fn delete_by_external_id( &mut self, external_id: &str, ) -> impl Future<Output = ContextResult<DeleteRecordResponse>> + Send

Source

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

Source

fn related( &self, target_id: &str, relation: Option<&str>, limit: Option<usize>, include_expired: bool, include_retired: bool, ) -> impl Future<Output = ContextResult<Vec<RecordDto>>> + Send

Source

fn search( &self, request: &SearchRequest, ) -> impl Future<Output = ContextResult<Vec<SearchResultDto>>> + Send

Source

fn retrieve( &self, request: &RetrieveRequest, ) -> impl Future<Output = ContextResult<Vec<RetrieveResultDto>>> + 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§