pub struct SqliteStore { /* private fields */ }Implementations§
Source§impl SqliteStore
impl SqliteStore
pub async fn new(database_url: &str) -> Result<Self, StoreError>
pub async fn new_for_device( database_url: &str, device_id: i32, ) -> Result<Self, StoreError>
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_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>>>
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,
Get an app state sync key by ID.
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,
Set an app state sync key.
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,
Get the app state version for a collection.
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,
Set the app state version for a collection.
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,
Store mutation MACs for a version.
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,
Get a mutation MAC by index.
Source§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,
Delete mutation MACs by their index MACs.
Source§impl Clone for SqliteStore
impl Clone for SqliteStore
Source§fn clone(&self) -> SqliteStore
fn clone(&self) -> SqliteStore
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl DeviceStore for SqliteStore
impl DeviceStore for SqliteStore
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,
Save device data.
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,
Load device data.
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,
Check if a device exists.
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,
Create a new device row and return its generated device_id.
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,
Create a snapshot of the database state.
The argument
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 ProtocolStore for SqliteStore
impl ProtocolStore for SqliteStore
Source§fn get_skdm_recipients<'life0, 'life1, 'async_trait>(
&'life0 self,
group_jid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Jid>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_skdm_recipients<'life0, 'life1, 'async_trait>(
&'life0 self,
group_jid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Jid>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get device JIDs that have received SKDM for a group.
Source§fn add_skdm_recipients<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
group_jid: &'life1 str,
device_jids: &'life2 [Jid],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn add_skdm_recipients<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
group_jid: &'life1 str,
device_jids: &'life2 [Jid],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Record devices that have received SKDM for a group.
Source§fn clear_skdm_recipients<'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_skdm_recipients<'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,
Clear SKDM recipients for a group (call when sender key is rotated).
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,
Get a mapping by LID.
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,
Get a mapping by phone number (returns the most recent LID for that phone).
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,
Store or update a LID-PN mapping.
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,
Get all LID-PN mappings (for cache warm-up).
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,
Save the base key for a session address during retry collision detection.
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,
Check if the current session has the same base key as the saved one.
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,
Delete a base key entry.
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,
Update the device list for a user (called after usync responses).
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,
Get all known devices for a user.
Source§fn mark_forget_sender_key<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
group_jid: &'life1 str,
participant: &'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 mark_forget_sender_key<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
group_jid: &'life1 str,
participant: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Mark a participant’s sender key as needing regeneration for a group.
Source§fn consume_forget_marks<'life0, 'life1, 'async_trait>(
&'life0 self,
group_jid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn consume_forget_marks<'life0, 'life1, 'async_trait>(
&'life0 self,
group_jid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get participants that need fresh SKDM (marked for forget).
Consumes the marks (deletes them after reading).
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,
Get a trusted contact token for a JID (stored under LID).
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,
Store or update a trusted contact token for a JID.
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,
Delete a trusted contact token for a JID.
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,
Store an identity key for a remote address.
Source§fn load_identity<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'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 load_identity<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load an identity key for a remote address.
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,
Delete an identity key.
Source§fn get_session<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'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_session<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get an encrypted session for an address.
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,
Store an encrypted session.
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,
Delete a session.
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,
Store a pre-key.
Source§fn load_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_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,
Load a pre-key by ID.
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,
Remove a pre-key.
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,
Store a signed pre-key.
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,
Load a signed pre-key by ID.
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,
Load all signed pre-keys. Returns (id, record) pairs.
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,
Remove a signed pre-key.
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,
Store a sender key for group messaging.
Source§fn get_sender_key<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'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_sender_key<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a sender key.
Source§fn delete_sender_key<'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_sender_key<'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,
Delete a sender key.
Source§fn has_session<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn has_session<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Check if a session exists. Default implementation uses
get_session.Auto Trait Implementations§
impl Freeze for SqliteStore
impl !RefUnwindSafe for SqliteStore
impl Send for SqliteStore
impl Sync for SqliteStore
impl Unpin for SqliteStore
impl UnsafeUnpin for SqliteStore
impl !UnwindSafe 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
Add an aggregate function filter Read more
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>,
Add an aggregate function order Read more
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
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>
Converts
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>
Converts
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)
Converts
&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)
Converts
&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
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 moreSource§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
Convert
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
Convert
&self to an expression for Diesel’s query builder. Read moreSource§impl<T> WindowExpressionMethods for T
impl<T> WindowExpressionMethods for T
Source§fn over(self) -> Self::Outputwhere
Self: OverDsl,
fn over(self) -> Self::Outputwhere
Self: OverDsl,
Turn a function call into a window function call Read more
Source§fn window_filter<P>(self, f: P) -> Self::Output
fn window_filter<P>(self, f: P) -> Self::Output
Add a filter to the current window function Read more
Source§fn partition_by<E>(self, expr: E) -> Self::Outputwhere
Self: PartitionByDsl<E>,
fn partition_by<E>(self, expr: E) -> Self::Outputwhere
Self: PartitionByDsl<E>,
Add a partition clause to the current window function Read more
Source§fn window_order<E>(self, expr: E) -> Self::Outputwhere
Self: OrderWindowDsl<E>,
fn window_order<E>(self, expr: E) -> Self::Outputwhere
Self: OrderWindowDsl<E>,
Add a order clause to the current window function Read more