pub struct SqliteStore { /* private fields */ }Implementations§
Source§impl SqliteStore
impl SqliteStore
Handle for sibling crates to run their own queries and migrations against this store’s database file through the same pool and semaphore.
Source§impl SqliteStore
impl SqliteStore
Sourcepub async fn new(database_url: &str) -> Result<Self, StoreError>
pub async fn new(database_url: &str) -> Result<Self, StoreError>
Open a store with the default low-memory SqliteStoreConfig.
Sourcepub async fn with_config(
database_url: &str,
config: SqliteStoreConfig,
) -> Result<Self, StoreError>
pub async fn with_config( database_url: &str, config: SqliteStoreConfig, ) -> Result<Self, StoreError>
Open a store with a custom SqliteStoreConfig (the default favours low memory /
high session density; override to trade memory for concurrency or cache).
pub async fn new_for_device( database_url: &str, device_id: i32, ) -> Result<Self, StoreError>
Sourcepub async fn with_config_for_device(
database_url: &str,
device_id: i32,
config: SqliteStoreConfig,
) -> Result<Self, StoreError>
pub async fn with_config_for_device( database_url: &str, device_id: i32, config: SqliteStoreConfig, ) -> Result<Self, StoreError>
Open a store for a specific device with a custom SqliteStoreConfig.
pub fn device_id(&self) -> i32
pub async fn save_device_data_for_device( &self, device_id: i32, device_data: &CoreDevice, ) -> Result<()>
pub async fn create_new_device(&self) -> Result<i32>
pub async fn device_exists(&self, device_id: i32) -> Result<bool>
pub async fn load_device_data_for_device( &self, device_id: i32, ) -> Result<Option<CoreDevice>>
pub async fn put_identity_for_device( &self, address: &str, key: [u8; 32], device_id: i32, ) -> Result<()>
pub async fn delete_identity_for_device( &self, address: &str, device_id: i32, ) -> Result<()>
pub async fn load_identity_for_device( &self, address: &str, device_id: i32, ) -> Result<Option<Vec<u8>>>
pub async fn get_session_for_device( &self, address: &str, device_id: i32, ) -> Result<Option<Vec<u8>>>
pub async fn put_session_for_device( &self, address: &str, session: &[u8], device_id: i32, ) -> Result<()>
pub async fn delete_session_for_device( &self, address: &str, device_id: i32, ) -> Result<()>
pub async fn put_sender_key_for_device( &self, address: &str, record: &[u8], device_id: i32, ) -> Result<()>
pub async fn get_sender_key_for_device( &self, address: &str, device_id: i32, ) -> Result<Option<Vec<u8>>>
pub async fn delete_sender_key_for_device( &self, address: &str, device_id: i32, ) -> Result<()>
pub async fn get_app_state_sync_key_for_device( &self, key_id: &[u8], device_id: i32, ) -> Result<Option<AppStateSyncKey>>
pub async fn set_app_state_sync_key_for_device( &self, key_id: &[u8], key: AppStateSyncKey, device_id: i32, ) -> Result<()>
pub async fn get_latest_app_state_sync_key_id_for_device( &self, device_id: i32, ) -> Result<Option<Vec<u8>>>
pub async fn get_app_state_version_for_device( &self, name: &str, device_id: i32, ) -> Result<HashState>
pub async fn set_app_state_version_for_device( &self, name: &str, state: HashState, device_id: i32, ) -> Result<()>
pub async fn put_app_state_mutation_macs_for_device( &self, name: &str, version: u64, mutations: &[AppStateMutationMAC], device_id: i32, ) -> Result<()>
pub async fn delete_app_state_mutation_macs_for_device( &self, name: &str, index_macs: &[Vec<u8>], device_id: i32, ) -> Result<()>
pub async fn get_app_state_mutation_mac_for_device( &self, name: &str, index_mac: &[u8], device_id: i32, ) -> Result<Option<Vec<u8>>>
Sourcepub async fn get_app_state_mutation_macs_batch_for_device(
&self,
name: &str,
index_macs: &[[u8; 32]],
device_id: i32,
) -> Result<HashMap<[u8; 32], Vec<u8>>>
pub async fn get_app_state_mutation_macs_batch_for_device( &self, name: &str, index_macs: &[[u8; 32]], device_id: i32, ) -> Result<HashMap<[u8; 32], Vec<u8>>>
Batched read of previous-MAC values for many index_macs in one query
(single spawn_blocking + index_mac IN (...)), replacing the per-mutation
N+1 in appstate sync.
Trait Implementations§
Source§impl AppSyncStore for SqliteStore
impl AppSyncStore for SqliteStore
Source§fn get_sync_key<'life0, 'life1, 'async_trait>(
&'life0 self,
key_id: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<Option<AppStateSyncKey>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_sync_key<'life0, 'life1, 'async_trait>(
&'life0 self,
key_id: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<Option<AppStateSyncKey>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn set_sync_key<'life0, 'life1, 'async_trait>(
&'life0 self,
key_id: &'life1 [u8],
key: AppStateSyncKey,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn set_sync_key<'life0, 'life1, 'async_trait>(
&'life0 self,
key_id: &'life1 [u8],
key: AppStateSyncKey,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn get_version<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<HashState>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_version<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<HashState>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn set_version<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
state: HashState,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn set_version<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
state: HashState,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn put_mutation_macs<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
version: u64,
mutations: &'life2 [AppStateMutationMAC],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn put_mutation_macs<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
version: u64,
mutations: &'life2 [AppStateMutationMAC],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn get_mutation_mac<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
index_mac: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_mutation_mac<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
index_mac: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn get_mutation_macs<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
index_macs: &'life2 [[u8; 32]],
) -> Pin<Box<dyn Future<Output = Result<HashMap<[u8; 32], Vec<u8>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_mutation_macs<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
index_macs: &'life2 [[u8; 32]],
) -> Pin<Box<dyn Future<Output = Result<HashMap<[u8; 32], Vec<u8>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
get_mutation_mac: fetch many previous-MAC values in a
single backend round-trip. The default delegates to per-item lookups;
backends with a set-membership query (SQL IN (...)) should override to
avoid an N+1 (one DB round-trip per mutation in appstate sync). Read moreSource§fn delete_mutation_macs<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
index_macs: &'life2 [Vec<u8>],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete_mutation_macs<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
index_macs: &'life2 [Vec<u8>],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn clear_mutation_macs<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn clear_mutation_macs<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§impl Clone for SqliteStore
impl Clone for SqliteStore
Source§fn clone(&self) -> SqliteStore
fn clone(&self) -> SqliteStore
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl DeviceStore for SqliteStore
impl DeviceStore for SqliteStore
Source§fn resource_report<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StorageResourceReport> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn resource_report<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StorageResourceReport> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Per-session storage memory, the largest per-session chunk in the profiling that motivated this (the default 512 KiB page cache).
SQLite’s exact cache-in-use (sqlite3_db_status(SQLITE_DBSTATUS_CACHE_USED))
needs the raw sqlite3* handle, which Diesel does not expose through a
safe API. Instead we bound it with PRAGMAs: a connection’s page cache
never holds more than the database’s own pages, nor more than the
configured cap, so min(cache cap, db size) is a tight per-connection
upper bound for the target workload (a fresh per-session DB far smaller
than the 512 KiB cap). Each pooled connection keeps its OWN cache (no
shared cache), so the figure is scaled by the number of open connections
— a no-op for the default single-connection store. pages is the
database page count (a size indicator, shared across connections).
Caveat: this does not account for SqliteStoreConfig::mmap_size. With
mmap enabled, some reads bypass the heap page cache via an OS-reclaimable
file mapping, so the estimate can overstate actual process-heap residency
for that session.
Source§fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
device: &'life1 CoreDevice,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
device: &'life1 CoreDevice,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn load<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<CoreDevice>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<CoreDevice>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn exists<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn exists<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn create<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<i32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<i32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn snapshot_db<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
extra_content: Option<&'life2 [u8]>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn snapshot_db<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
extra_content: Option<&'life2 [u8]>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
name can be used to label the snapshot file.
extra_content can be used to save a related binary blob (e.g. the message that caused the failure).Source§impl MsgSecretStore for SqliteStore
impl MsgSecretStore for SqliteStore
Source§fn put_msg_secrets<'life0, 'async_trait>(
&'life0 self,
entries: Vec<MsgSecretEntry>,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn put_msg_secrets<'life0, 'async_trait>(
&'life0 self,
entries: Vec<MsgSecretEntry>,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
expires_at deadline. On key conflict
implementations merge deterministically via merge_msg_secret_expiry
(later deadline wins, 0 = “never” = infinity) so a redelivery or edit
re-persist never shortens a window, and via merge_msg_secret_message_ts
(the later non-zero parent time wins; a 0 never clobbers a known one).Source§fn get_msg_secret<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
chat: &'life1 str,
sender: &'life2 str,
msg_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn get_msg_secret<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
chat: &'life1 str,
sender: &'life2 str,
msg_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
None if absent.Source§fn get_msg_secret_with_ts<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
chat: &'life1 str,
sender: &'life2 str,
msg_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Option<(Vec<u8>, i64)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn get_msg_secret_with_ts<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
chat: &'life1 str,
sender: &'life2 str,
msg_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Option<(Vec<u8>, i64)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
message_ts, 0 when unknown), so the receive path can enforce the
edit-processing window. Default pairs get_msg_secret with 0;
backends that store message_ts override this.Source§fn delete_expired_msg_secrets<'life0, 'async_trait>(
&'life0 self,
cutoff_timestamp: i64,
) -> Pin<Box<dyn Future<Output = Result<u32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_expired_msg_secrets<'life0, 'async_trait>(
&'life0 self,
cutoff_timestamp: i64,
) -> Pin<Box<dyn Future<Output = Result<u32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
expires_at is at or before
cutoff_timestamp (absolute unix seconds; callers pass “now”). Rows
with expires_at = 0 (never) are kept. Returns the number removed so
the keepalive cleanup can log/throttle.Source§fn put_msg_secret<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
chat: &'life1 str,
sender: &'life2 str,
msg_id: &'life3 str,
secret: &'life4 [u8; 32],
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
fn put_msg_secret<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
chat: &'life1 str,
sender: &'life2 str,
msg_id: &'life3 str,
secret: &'life4 [u8; 32],
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
secret under the composite key with NO
expiry (expires_at = 0). Convenience wrapper over put_msg_secrets.
chat, sender, and msg_id are JID strings / message ID strings;
callers should pass non-AD (no-device) form for the JIDs so lookups
match regardless of which device echo’d the stanza back. Read moreSource§impl ProtocolStore for SqliteStore
impl ProtocolStore for SqliteStore
Source§fn get_sender_key_devices<'life0, 'life1, 'async_trait>(
&'life0 self,
group_jid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<(String, bool)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_sender_key_devices<'life0, 'life1, 'async_trait>(
&'life0 self,
group_jid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<(String, bool)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
(device_jid_string, has_key) pairs where has_key indicates
whether the device has a valid sender key (true) or needs fresh SKDM (false).Source§fn set_sender_key_status<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
group_jid: &'life1 str,
entries: &'life2 [(&'life3 str, bool)],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn set_sender_key_status<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
group_jid: &'life1 str,
entries: &'life2 [(&'life3 str, bool)],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
has_key=true after successful
SKDM distribution (WA Web: markHasSenderKey), or has_key=false to mark
devices as needing fresh SKDM (WA Web: markForgetSenderKey).Source§fn clear_sender_key_devices<'life0, 'life1, 'async_trait>(
&'life0 self,
group_jid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn clear_sender_key_devices<'life0, 'life1, 'async_trait>(
&'life0 self,
group_jid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn clear_all_sender_key_devices<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn clear_all_sender_key_devices<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn delete_sender_key_device_rows<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
device_jids: &'life1 [&'life2 str],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete_sender_key_device_rows<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
device_jids: &'life1 [&'life2 str],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
sender_key_devices rows by device JID across all groups.
Mirrors WA Web’s per-group senderKey.delete(deviceJid) cleanup.Source§fn get_lid_mapping<'life0, 'life1, 'async_trait>(
&'life0 self,
lid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<LidPnMappingEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_lid_mapping<'life0, 'life1, 'async_trait>(
&'life0 self,
lid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<LidPnMappingEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn get_pn_mapping<'life0, 'life1, 'async_trait>(
&'life0 self,
phone: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<LidPnMappingEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_pn_mapping<'life0, 'life1, 'async_trait>(
&'life0 self,
phone: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<LidPnMappingEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn put_lid_mapping<'life0, 'life1, 'async_trait>(
&'life0 self,
entry: &'life1 LidPnMappingEntry,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn put_lid_mapping<'life0, 'life1, 'async_trait>(
&'life0 self,
entry: &'life1 LidPnMappingEntry,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn put_lid_mappings<'life0, 'life1, 'async_trait>(
&'life0 self,
entries: &'life1 [LidPnMappingEntry],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn put_lid_mappings<'life0, 'life1, 'async_trait>(
&'life0 self,
entries: &'life1 [LidPnMappingEntry],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
put_lid_mapping. Backends should override with a
single transaction; the default loops for correctness. Mirrors WA Web’s
WAWebDBCreateLidPnMappings.createLidPnMappings({ mappings, … }).Source§fn get_all_lid_mappings<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<LidPnMappingEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_all_lid_mappings<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<LidPnMappingEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn save_base_key<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
address: &'life1 str,
message_id: &'life2 str,
base_key: &'life3 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn save_base_key<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
address: &'life1 str,
message_id: &'life2 str,
base_key: &'life3 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Source§fn has_same_base_key<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
address: &'life1 str,
message_id: &'life2 str,
current_base_key: &'life3 [u8],
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn has_same_base_key<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
address: &'life1 str,
message_id: &'life2 str,
current_base_key: &'life3 [u8],
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Source§fn delete_base_key<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
address: &'life1 str,
message_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete_base_key<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
address: &'life1 str,
message_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn update_device_list<'life0, 'async_trait>(
&'life0 self,
record: DeviceListRecord,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update_device_list<'life0, 'async_trait>(
&'life0 self,
record: DeviceListRecord,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn update_device_lists<'life0, 'async_trait>(
&'life0 self,
records: Vec<DeviceListRecord>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update_device_lists<'life0, 'async_trait>(
&'life0 self,
records: Vec<DeviceListRecord>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
update_device_list. Backends should override with
a single transaction; the default loops for correctness. Important on
usync of large groups, where the per-row commit + spawn_blocking
overhead dominates wall-clock time when called once per participant.Source§fn get_devices<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<DeviceListRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_devices<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<DeviceListRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn delete_devices<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_devices<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn get_group_metadata<'life0, 'life1, 'async_trait>(
&'life0 self,
group_jid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_group_metadata<'life0, 'life1, 'async_trait>(
&'life0 self,
group_jid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
group_jid.
The blob is a caller-serialized GroupInfo snapshot; backends without group
persistence return None (the group is then re-queried in full).Source§fn put_group_metadata<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
group_jid: &'life1 str,
blob: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn put_group_metadata<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
group_jid: &'life1 str,
blob: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
group_jid.
No-op by default; backends override to enable the phash re-query skip.Source§fn delete_group_metadata<'life0, 'life1, 'async_trait>(
&'life0 self,
group_jid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_group_metadata<'life0, 'life1, 'async_trait>(
&'life0 self,
group_jid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
group_jid (e.g. on leave),
so the next query re-fetches in full instead of comparing a stale phash.
No-op by default.Source§fn get_tc_token<'life0, 'life1, 'async_trait>(
&'life0 self,
jid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<TcTokenEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_tc_token<'life0, 'life1, 'async_trait>(
&'life0 self,
jid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<TcTokenEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn put_tc_token<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
jid: &'life1 str,
entry: &'life2 TcTokenEntry,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn put_tc_token<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
jid: &'life1 str,
entry: &'life2 TcTokenEntry,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn delete_tc_token<'life0, 'life1, 'async_trait>(
&'life0 self,
jid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_tc_token<'life0, 'life1, 'async_trait>(
&'life0 self,
jid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn get_all_tc_token_jids<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_all_tc_token_jids<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn delete_expired_tc_tokens<'life0, 'async_trait>(
&'life0 self,
token_cutoff: i64,
sender_cutoff: i64,
) -> Pin<Box<dyn Future<Output = Result<u32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_expired_tc_tokens<'life0, 'async_trait>(
&'life0 self,
token_cutoff: i64,
sender_cutoff: i64,
) -> Pin<Box<dyn Future<Output = Result<u32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
token_timestamp < token_cutoff
or empty) and its sender bucket is expired-or-absent
(sender_timestamp < sender_cutoff or null), so recent sender state is
never dropped just because the received token expired. Returns count deleted.Source§fn store_received_tc_token<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
jid: &'life1 str,
token: &'life2 [u8],
token_timestamp: i64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn store_received_tc_token<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
jid: &'life1 str,
token: &'life2 [u8],
token_timestamp: i64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
sender_timestamp. The symmetric counterpart of
touch_tc_token_sender_timestamp:
each writer owns its own field, so the notification path never drops a
sender bucket that the issuance path wrote concurrently. Read moreSource§fn touch_tc_token_sender_timestamp<'life0, 'life1, 'async_trait>(
&'life0 self,
jid: &'life1 str,
sender_timestamp: i64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn touch_tc_token_sender_timestamp<'life0, 'life1, 'async_trait>(
&'life0 self,
jid: &'life1 str,
sender_timestamp: i64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
sender_timestamp toward sender_timestamp for a contact,
inserting a byte-less placeholder when absent and preserving any existing
token bytes. The stored value only ever moves forward (max), so
concurrent writers (post-send issuance, history sync) converge regardless
of ordering and never regress the sender bucket. Read moreSource§fn store_sent_message<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
chat_jid: &'life1 str,
message_id: &'life2 str,
payload: &'life3 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn store_sent_message<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
chat_jid: &'life1 str,
message_id: &'life2 str,
payload: &'life3 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Source§fn take_sent_message<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
chat_jid: &'life1 str,
message_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn take_sent_message<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
chat_jid: &'life1 str,
message_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn delete_expired_sent_messages<'life0, 'async_trait>(
&'life0 self,
cutoff_timestamp: i64,
) -> Pin<Box<dyn Future<Output = Result<u32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_expired_sent_messages<'life0, 'async_trait>(
&'life0 self,
cutoff_timestamp: i64,
) -> Pin<Box<dyn Future<Output = Result<u32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn store_pending_inbound<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
chat: &'life1 str,
sender: &'life2 str,
id: &'life3 str,
message: &'life4 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn store_pending_inbound<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
chat: &'life1 str,
sender: &'life2 str,
id: &'life3 str,
message: &'life4 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
(chat, sender, id) because stanza ids are only unique within
a (chat, sender).Source§fn get_pending_inbound<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
chat: &'life1 str,
sender: &'life2 str,
id: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn get_pending_inbound<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
chat: &'life1 str,
sender: &'life2 str,
id: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
(chat, sender, id) without removing it.Source§fn delete_pending_inbound<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
chat: &'life1 str,
sender: &'life2 str,
id: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn delete_pending_inbound<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
chat: &'life1 str,
sender: &'life2 str,
id: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Source§fn delete_expired_pending_inbound<'life0, 'async_trait>(
&'life0 self,
cutoff_timestamp: i64,
) -> Pin<Box<dyn Future<Output = Result<u32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_expired_pending_inbound<'life0, 'async_trait>(
&'life0 self,
cutoff_timestamp: i64,
) -> Pin<Box<dyn Future<Output = Result<u32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Ok(0): the
keepalive sweep calls it unconditionally for every backend, so it must not
error when the buffer is unsupported.Source§fn store_pending_inbound_batch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
rows: &'life1 [PendingInboundRow<'life2>],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn store_pending_inbound_batch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
rows: &'life1 [PendingInboundRow<'life2>],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
store_pending_inbound: the
offline drain buffers one commit-batch of messages per call, so backends
should override this with a single transaction (the bundled SqliteStore
does). The default iterates the single-row method, preserving behavior
for third-party backends.Source§fn delete_pending_inbound_batch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
keys: &'life1 [PendingInboundKey<'life2>],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete_pending_inbound_batch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
keys: &'life1 [PendingInboundKey<'life2>],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
delete_pending_inbound; same
override guidance as store_pending_inbound_batch.Source§impl SignalStore for SqliteStore
impl SignalStore for SqliteStore
Source§fn put_identity<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 str,
key: [u8; 32],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn put_identity<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 str,
key: [u8; 32],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn put_identities_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
identities: &'life1 [(Arc<str>, [u8; 32])],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn put_identities_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
identities: &'life1 [(Arc<str>, [u8; 32])],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
put_identity calls.
Addresses are Arc<str> so callers (the flush path) pass shared keys
without allocating a String per entry.Source§fn load_identity<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<[u8; 32]>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_identity<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<[u8; 32]>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn delete_identity<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_identity<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn get_session<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_session<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn has_session<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn has_session<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
get_session.Source§fn has_signal_state_for_user<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn has_signal_state_for_user<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
user across all device ids.
Addresses are keyed user@server (device 0) or user:dev@server. Used
to skip the per-device PN->LID migration scan for users we’ve never had
Signal state with. Default is conservative (true) so a backend that
doesn’t implement it keeps the caller’s full per-device scan.Source§fn put_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
address: &'life1 str,
session: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn put_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
address: &'life1 str,
session: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn put_sessions_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
sessions: &'life1 [(Arc<str>, Bytes)],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn put_sessions_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
sessions: &'life1 [(Arc<str>, Bytes)],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
put_session calls.Source§fn delete_session<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_session<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn store_prekey<'life0, 'life1, 'async_trait>(
&'life0 self,
id: u32,
record: &'life1 [u8],
uploaded: bool,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn store_prekey<'life0, 'life1, 'async_trait>(
&'life0 self,
id: u32,
record: &'life1 [u8],
uploaded: bool,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn store_prekeys_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
keys: &'life1 [(u32, Bytes)],
uploaded: bool,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn store_prekeys_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
keys: &'life1 [(u32, Bytes)],
uploaded: bool,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
store_prekey calls.Source§fn load_prekey<'life0, 'async_trait>(
&'life0 self,
id: u32,
) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_prekey<'life0, 'async_trait>(
&'life0 self,
id: u32,
) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn load_prekeys_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
ids: &'life1 [u32],
) -> Pin<Box<dyn Future<Output = Result<Vec<(u32, Bytes)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_prekeys_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
ids: &'life1 [u32],
) -> Pin<Box<dyn Future<Output = Result<Vec<(u32, Bytes)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn remove_prekey<'life0, 'async_trait>(
&'life0 self,
id: u32,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn remove_prekey<'life0, 'async_trait>(
&'life0 self,
id: u32,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn mark_prekeys_uploaded<'life0, 'life1, 'async_trait>(
&'life0 self,
ids: &'life1 [u32],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn mark_prekeys_uploaded<'life0, 'life1, 'async_trait>(
&'life0 self,
ids: &'life1 [u32],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn get_max_prekey_id<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_max_prekey_id<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
next_pre_key_id counter is not yet initialized.Source§fn store_signed_prekey<'life0, 'life1, 'async_trait>(
&'life0 self,
id: u32,
record: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn store_signed_prekey<'life0, 'life1, 'async_trait>(
&'life0 self,
id: u32,
record: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn load_signed_prekey<'life0, 'async_trait>(
&'life0 self,
id: u32,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_signed_prekey<'life0, 'async_trait>(
&'life0 self,
id: u32,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn load_all_signed_prekeys<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<(u32, Vec<u8>)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_all_signed_prekeys<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<(u32, Vec<u8>)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn remove_signed_prekey<'life0, 'async_trait>(
&'life0 self,
id: u32,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn remove_signed_prekey<'life0, 'async_trait>(
&'life0 self,
id: u32,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn put_sender_key<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
address: &'life1 str,
record: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn put_sender_key<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
address: &'life1 str,
record: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn put_sender_keys_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
sender_keys: &'life1 [(Arc<str>, Bytes)],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn put_sender_keys_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
sender_keys: &'life1 [(Arc<str>, Bytes)],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
put_sender_key calls.Auto Trait Implementations§
impl !RefUnwindSafe for SqliteStore
impl !UnwindSafe for SqliteStore
impl Freeze for SqliteStore
impl Send for SqliteStore
impl Sync for SqliteStore
impl Unpin for SqliteStore
impl UnsafeUnpin for SqliteStore
Blanket Implementations§
Source§impl<T> AggregateExpressionMethods for T
impl<T> AggregateExpressionMethods for T
Source§fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
DISTINCT modifier for aggregate functions Read moreSource§fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
ALL modifier for aggregate functions Read moreSource§fn aggregate_filter<P>(self, f: P) -> Self::Output
fn aggregate_filter<P>(self, f: P) -> Self::Output
Source§fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
impl<T> Backend for T
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
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>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn 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>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which 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)
&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)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
self to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
&self to an expression for Diesel’s query builder. Read more