pub struct SqliteMemoryStore { /* private fields */ }Expand description
Durable memory store with full history in SQLite.
Implementations§
Source§impl SqliteMemoryStore
impl SqliteMemoryStore
Sourcepub fn open(path: &str) -> Result<Self, StoreError>
pub fn open(path: &str) -> Result<Self, StoreError>
Open (or create) a store at the given file path.
Sourcepub fn open_in_memory() -> Result<Self, StoreError>
pub fn open_in_memory() -> Result<Self, StoreError>
Open a transient in-memory database (useful in tests).
Trait Implementations§
Source§impl MemoryPort for SqliteMemoryStore
impl MemoryPort for SqliteMemoryStore
Source§type Error = StoreError
type Error = StoreError
Error type returned by memory operations.
Source§fn append(&self, key: &str, content: &str) -> Result<Uuid, Self::Error>
fn append(&self, key: &str, content: &str) -> Result<Uuid, Self::Error>
Append a new entry under
key with content. Returns the new id.Source§fn get(&self, key: &str) -> Result<Option<String>, Self::Error>
fn get(&self, key: &str) -> Result<Option<String>, Self::Error>
Return the latest value for
key, if any.Auto Trait Implementations§
impl !Freeze for SqliteMemoryStore
impl RefUnwindSafe for SqliteMemoryStore
impl Send for SqliteMemoryStore
impl Sync for SqliteMemoryStore
impl Unpin for SqliteMemoryStore
impl UnsafeUnpin for SqliteMemoryStore
impl UnwindSafe for SqliteMemoryStore
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