pub struct LocalMemoryStore { /* private fields */ }Expand description
Concrete private SQLite memory store.
Implementations§
Source§impl LocalMemoryStore
impl LocalMemoryStore
Sourcepub fn new(path: impl Into<PathBuf>) -> Self
pub fn new(path: impl Into<PathBuf>) -> Self
Opens or creates a private local SQLite store at path on first use.
Sourcepub async fn merge_remote_export(
&self,
memories: Vec<MemoryRecord>,
) -> Result<MemoryImportReport, MemoryError>
pub async fn merge_remote_export( &self, memories: Vec<MemoryRecord>, ) -> Result<MemoryImportReport, MemoryError>
Imports a validated remote snapshot into a local store as new probationary records.
Trait Implementations§
Source§impl Clone for LocalMemoryStore
impl Clone for LocalMemoryStore
Source§fn clone(&self) -> LocalMemoryStore
fn clone(&self) -> LocalMemoryStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LocalMemoryStore
impl Debug for LocalMemoryStore
Source§impl MemoryStore for LocalMemoryStore
impl MemoryStore for LocalMemoryStore
Source§fn scan(
&self,
query: &str,
limit: usize,
) -> impl Future<Output = Result<MemoryScan, MemoryError>> + Send
fn scan( &self, query: &str, limit: usize, ) -> impl Future<Output = Result<MemoryScan, MemoryError>> + Send
Searches visible records and records scan telemetry.
Source§fn read(
&self,
ids: &[i64],
keys: &[MemoryKey],
) -> impl Future<Output = Result<Vec<MemoryRecord>, MemoryError>> + Send
fn read( &self, ids: &[i64], keys: &[MemoryKey], ) -> impl Future<Output = Result<Vec<MemoryRecord>, MemoryError>> + Send
Reads unversioned IDs and versioned keys, recording use telemetry.
Source§fn list(
&self,
) -> impl Future<Output = Result<Vec<MemoryRecord>, MemoryError>> + Send
fn list( &self, ) -> impl Future<Output = Result<Vec<MemoryRecord>, MemoryError>> + Send
Lists a deterministic visible window after pruning probation. Read more
Source§fn put(
&self,
content: &str,
replacement: Option<MemoryKey>,
) -> impl Future<Output = Result<MemoryRecord, MemoryError>> + Send
fn put( &self, content: &str, replacement: Option<MemoryKey>, ) -> impl Future<Output = Result<MemoryRecord, MemoryError>> + Send
Inserts content or compare-and-swap replaces
replacement.Source§fn delete(
&self,
key: MemoryKey,
) -> impl Future<Output = Result<(), MemoryError>> + Send
fn delete( &self, key: MemoryKey, ) -> impl Future<Output = Result<(), MemoryError>> + Send
Compare-and-swap deletes
key. Read moreSource§fn sync(
&self,
memories: &[MemoryRecord],
) -> impl Future<Output = Result<SyncReport, MemoryError>> + Send
fn sync( &self, memories: &[MemoryRecord], ) -> impl Future<Output = Result<SyncReport, MemoryError>> + Send
Atomically applies an authoritative full snapshot to the owned namespace. Read more
Source§fn export_page(
&self,
_namespaces: Option<&[String]>,
cursor: Option<&ExportCursor>,
limit: usize,
) -> impl Future<Output = Result<(Vec<MemoryRecord>, Option<ExportCursor>), MemoryError>> + Send
fn export_page( &self, _namespaces: Option<&[String]>, cursor: Option<&ExportCursor>, limit: usize, ) -> impl Future<Output = Result<(Vec<MemoryRecord>, Option<ExportCursor>), MemoryError>> + Send
Source§fn export_all(
&self,
namespaces: Option<&[String]>,
) -> impl Future<Output = Result<Vec<MemoryRecord>, MemoryError>> + Send
fn export_all( &self, namespaces: Option<&[String]>, ) -> impl Future<Output = Result<Vec<MemoryRecord>, MemoryError>> + Send
Collects a complete bounded export through the paginated storage contract. Read more
Auto Trait Implementations§
impl Freeze for LocalMemoryStore
impl RefUnwindSafe for LocalMemoryStore
impl Send for LocalMemoryStore
impl Sync for LocalMemoryStore
impl Unpin for LocalMemoryStore
impl UnsafeUnpin for LocalMemoryStore
impl UnwindSafe for LocalMemoryStore
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.