pub struct CanonicalMemoryAdapter { /* private fields */ }Implementations§
Source§impl CanonicalMemoryAdapter
impl CanonicalMemoryAdapter
pub fn new( store: CanonicalMemoryStore, runtime_config: RuntimeConfig, ) -> Result<Self, RuntimeError>
pub fn open( memory_config: CanonicalMemoryConfig, runtime_config: RuntimeConfig, ) -> Result<Self, CanonicalMemoryOpenError>
pub fn open_with_mock_embedder( memory_config: CanonicalMemoryConfig, runtime_config: RuntimeConfig, ) -> Result<Self, CanonicalMemoryOpenError>
pub fn store(&self) -> &CanonicalMemoryStore
pub fn runtime(&self) -> &KnowledgeRuntime
pub async fn import_forge_export( &self, envelope: &ExportEnvelopeV3, ) -> Result<ProjectionImportResult, CanonicalMemoryAdapterError>
pub async fn query( &self, query: &str, scope: Option<&Scope>, ) -> Result<(Vec<SearchResult>, QueryTrace), RuntimeError>
pub async fn query_temporal( &self, query: &str, scope: Option<&Scope>, valid_at: &str, recorded_at_or_before: &str, ) -> Result<(Vec<SearchResult>, QueryTrace), RuntimeError>
pub async fn search( &self, query: &str, namespaces: Option<&[String]>, top_k: Option<usize>, ) -> Result<Vec<SearchResult>, CanonicalMemoryError>
pub async fn search_with_receipt( &self, query: &str, namespaces: Option<&[String]>, top_k: Option<usize>, ) -> Result<(Vec<SearchResult>, VectorSearchReceiptV1), CanonicalMemoryError>
pub async fn search_fts_only( &self, query: &str, top_k: Option<usize>, ) -> Result<Vec<SearchResult>, CanonicalMemoryError>
pub async fn search_vector_only( &self, query: &str, top_k: Option<usize>, ) -> Result<Vec<SearchResult>, CanonicalMemoryError>
pub async fn search_explained( &self, query: &str, top_k: Option<usize>, ) -> Result<ExplainedSearchResponse, CanonicalMemoryError>
pub async fn get_search_receipt( &self, receipt_id: &str, ) -> Result<Option<VectorSearchReceiptV1>, CanonicalMemoryError>
pub async fn replay_search_receipt( &self, receipt: VectorSearchReceiptV1, ) -> Result<SearchResponse, CanonicalMemoryError>
pub async fn add_graph_edge( &self, params: AddGraphEdgeParams, ) -> Result<StoredGraphEdge, CanonicalMemoryError>
pub async fn list_graph_edges( &self, node_id: &str, ) -> Result<Vec<StoredGraphEdge>, CanonicalMemoryError>
pub async fn count_graph_edges(&self) -> Result<usize, CanonicalMemoryError>
pub async fn verify_integrity( &self, mode: VerifyMode, ) -> Result<IntegrityReport, CanonicalMemoryError>
pub async fn reconcile( &self, mode: VerifyMode, ) -> Result<Vec<ReconcileAction>, CanonicalMemoryError>
pub async fn stats(&self) -> Result<MemoryStats, CanonicalMemoryError>
pub async fn add_fact( &self, namespace: &str, content: &str, source: Option<&str>, confidence: Option<f64>, ) -> Result<String, CanonicalMemoryError>
Auto Trait Implementations§
impl !RefUnwindSafe for CanonicalMemoryAdapter
impl !UnwindSafe for CanonicalMemoryAdapter
impl Freeze for CanonicalMemoryAdapter
impl Send for CanonicalMemoryAdapter
impl Sync for CanonicalMemoryAdapter
impl Unpin for CanonicalMemoryAdapter
impl UnsafeUnpin for CanonicalMemoryAdapter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more