pub struct SqliteStorageAdapter { /* private fields */ }Expand description
SQLite-backed implementation of iris_chat_protocol::StorageAdapter.
Keys are namespaced by (owner_pubkey_hex, device_pubkey_hex) so a
single database serves multiple owner accounts and devices without
keyspace collisions, matching the per-(owner, device) directory
scoping the previous file-backed adapter used.
Implementations§
Source§impl SqliteStorageAdapter
impl SqliteStorageAdapter
pub fn new( conn: SharedConnection, owner_pubkey_hex: String, device_pubkey_hex: String, ) -> Self
Trait Implementations§
Source§impl StorageAdapter for SqliteStorageAdapter
impl StorageAdapter for SqliteStorageAdapter
fn get(&self, key: &str) -> StorageResult<Option<String>>
fn put(&self, key: &str, value: String) -> StorageResult<()>
fn put_checkpoint( &self, key: &str, value: &StorageCheckpoint, ) -> StorageResult<()>
fn del(&self, key: &str) -> StorageResult<()>
fn list(&self, prefix: &str) -> StorageResult<Vec<String>>
Source§fn put_preserved(&self, key: &str, value: String) -> StorageResult<()>
fn put_preserved(&self, key: &str, value: String) -> StorageResult<()>
Preserve a migration input before a later checkpoint can replace it.
Buffered adapters must commit this write before returning success.
Auto Trait Implementations§
impl Forget for SqliteStorageAdapter
impl Freeze for SqliteStorageAdapter
impl Move for SqliteStorageAdapter
impl RefUnwindSafe for SqliteStorageAdapter
impl Send for SqliteStorageAdapter
impl Sync for SqliteStorageAdapter
impl Unpin for SqliteStorageAdapter
impl UnsafeUnpin for SqliteStorageAdapter
impl UnwindSafe for SqliteStorageAdapter
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