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 Freeze for BackendHandle
impl Send for BackendHandle
impl Sync for BackendHandle
impl Unpin for BackendHandle
impl UnsafeUnpin for BackendHandle
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