pub struct BackendHandle { /* private fields */ }Expand description
Backend-neutral handles with lazy SQLite readiness and per-operation retrieval bindings.
Implementations§
Source§impl BackendHandle
impl BackendHandle
Sourcepub fn from_sqlite(backend: Arc<StorageBackend>) -> Self
pub fn from_sqlite(backend: Arc<StorageBackend>) -> Self
Construction performs no storage operation; readiness errors occur at first use.
Sourcepub fn from_parts(
entity: Arc<dyn EntityStore>,
note: Arc<dyn NoteStore>,
graph: Arc<dyn GraphStore>,
event: Arc<dyn EventStore>,
sql: Arc<dyn SqlAccess>,
vector: Option<Arc<dyn VectorStoreFactory>>,
sparse: Option<Arc<dyn SparseStoreFactory>>,
text: Option<Arc<dyn TextSearchFactory>>,
) -> Self
pub fn from_parts( entity: Arc<dyn EntityStore>, note: Arc<dyn NoteStore>, graph: Arc<dyn GraphStore>, event: Arc<dyn EventStore>, sql: Arc<dyn SqlAccess>, vector: Option<Arc<dyn VectorStoreFactory>>, sparse: Option<Arc<dyn SparseStoreFactory>>, text: Option<Arc<dyn TextSearchFactory>>, ) -> Self
Retain the supplied core handles and independently optional retrieval factories.
pub fn entity(&self) -> &Arc<dyn EntityStore> ⓘ
pub fn note(&self) -> &Arc<dyn NoteStore> ⓘ
pub fn graph(&self) -> &Arc<dyn GraphStore> ⓘ
pub fn event(&self) -> &Arc<dyn EventStore> ⓘ
pub fn sql(&self) -> &Arc<dyn SqlAccess> ⓘ
pub fn vector( &self, model_key: &str, embedding_model: &str, dimensions: usize, namespace: &str, ) -> Result<Arc<dyn VectorStore>, BackendHandleError>
pub fn sparse( &self, model_key: &str, namespace: &str, ) -> Result<Arc<dyn SparseStore>, BackendHandleError>
pub fn text( &self, table_key: &str, tokenizer: &str, ) -> Result<Arc<dyn TextSearch>, BackendHandleError>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for BackendHandle
impl !UnwindSafe for BackendHandle
impl Forget for BackendHandle
impl Freeze for BackendHandlewhere
*const ArcInner<dyn EntityStore> is !null: Freeze,
PhantomData<ArcInner<dyn EntityStore>>: Freeze,
*const ArcInner<dyn NoteStore> is !null: Freeze,
PhantomData<ArcInner<dyn NoteStore>>: Freeze,
*const ArcInner<dyn GraphStore> is !null: Freeze,
PhantomData<ArcInner<dyn GraphStore>>: Freeze,
*const ArcInner<dyn EventStore> is !null: Freeze,
PhantomData<ArcInner<dyn EventStore>>: Freeze,
*const ArcInner<dyn SqlAccess> is !null: Freeze,
PhantomData<ArcInner<dyn SqlAccess>>: Freeze,
*const ArcInner<dyn VectorStoreFactory> is !null: Freeze,
PhantomData<ArcInner<dyn VectorStoreFactory>>: Freeze,
*const ArcInner<dyn SparseStoreFactory> is !null: Freeze,
PhantomData<ArcInner<dyn SparseStoreFactory>>: Freeze,
*const ArcInner<dyn TextSearchFactory> is !null: Freeze,
PhantomData<ArcInner<dyn TextSearchFactory>>: Freeze,
impl Move for BackendHandle
impl Send for BackendHandlewhere
Arc<dyn EntityStore>: Send,
Arc<dyn NoteStore>: Send,
Arc<dyn GraphStore>: Send,
Arc<dyn EventStore>: Send,
Arc<dyn SqlAccess>: Send,
Arc<dyn VectorStoreFactory>: Send,
Arc<dyn SparseStoreFactory>: Send,
Arc<dyn TextSearchFactory>: Send,
impl Sync for BackendHandlewhere
Arc<dyn EntityStore>: Sync,
Arc<dyn NoteStore>: Sync,
Arc<dyn GraphStore>: Sync,
Arc<dyn EventStore>: Sync,
Arc<dyn SqlAccess>: Sync,
Arc<dyn VectorStoreFactory>: Sync,
Arc<dyn SparseStoreFactory>: Sync,
Arc<dyn TextSearchFactory>: Sync,
impl Unpin for BackendHandlewhere
Arc<dyn EntityStore>: Unpin,
Arc<dyn NoteStore>: Unpin,
Arc<dyn GraphStore>: Unpin,
Arc<dyn EventStore>: Unpin,
Arc<dyn SqlAccess>: Unpin,
Arc<dyn VectorStoreFactory>: Unpin,
Arc<dyn SparseStoreFactory>: Unpin,
Arc<dyn TextSearchFactory>: Unpin,
impl UnsafeUnpin for BackendHandlewhere
*const ArcInner<dyn EntityStore> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn EntityStore>>: UnsafeUnpin,
*const ArcInner<dyn NoteStore> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn NoteStore>>: UnsafeUnpin,
*const ArcInner<dyn GraphStore> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn GraphStore>>: UnsafeUnpin,
*const ArcInner<dyn EventStore> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn EventStore>>: UnsafeUnpin,
*const ArcInner<dyn SqlAccess> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn SqlAccess>>: UnsafeUnpin,
*const ArcInner<dyn VectorStoreFactory> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn VectorStoreFactory>>: UnsafeUnpin,
*const ArcInner<dyn SparseStoreFactory> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn SparseStoreFactory>>: UnsafeUnpin,
*const ArcInner<dyn TextSearchFactory> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn TextSearchFactory>>: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more