pub trait SessionStoreExt: SessionStore {
// Required methods
fn get_sub_device_sessions<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 ServiceAddress,
) -> Pin<Box<dyn Future<Output = Result<Vec<u32>, SignalProtocolError>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete_session<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 ProtocolAddress,
) -> Pin<Box<dyn Future<Output = Result<(), SignalProtocolError>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete_all_sessions<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 ServiceAddress,
) -> Pin<Box<dyn Future<Output = Result<usize, SignalProtocolError>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided methods
fn delete_service_addr_device_session<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 ProtocolAddress,
) -> Pin<Box<dyn Future<Output = Result<usize, SignalProtocolError>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn compute_safety_number<'s, 'async_trait>(
&'s self,
local_address: &'s ServiceAddress,
address: &'s ServiceAddress,
) -> Pin<Box<dyn Future<Output = Result<String, SignalProtocolError>> + 'async_trait>>
where Self: Sized + IdentityKeyStore + 'async_trait,
's: 'async_trait { ... }
}
Expand description
This is additional functions required to handle
session deletion. It might be a candidate for inclusion into
the bigger SessionStore
trait.
Required Methods§
sourcefn get_sub_device_sessions<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 ServiceAddress,
) -> Pin<Box<dyn Future<Output = Result<Vec<u32>, SignalProtocolError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_sub_device_sessions<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 ServiceAddress,
) -> Pin<Box<dyn Future<Output = Result<Vec<u32>, SignalProtocolError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get the IDs of all known sub devices with active sessions for a recipient.
This should return every device except for the main device DEFAULT_DEVICE_ID.
sourcefn delete_session<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 ProtocolAddress,
) -> Pin<Box<dyn Future<Output = Result<(), SignalProtocolError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_session<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 ProtocolAddress,
) -> Pin<Box<dyn Future<Output = Result<(), SignalProtocolError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Remove a session record for a recipient ID + device ID tuple.
sourcefn delete_all_sessions<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 ServiceAddress,
) -> Pin<Box<dyn Future<Output = Result<usize, SignalProtocolError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_all_sessions<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 ServiceAddress,
) -> Pin<Box<dyn Future<Output = Result<usize, SignalProtocolError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Remove the session records corresponding to all devices of a recipient ID.
Returns the number of deleted sessions.
Provided Methods§
sourcefn delete_service_addr_device_session<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 ProtocolAddress,
) -> Pin<Box<dyn Future<Output = Result<usize, SignalProtocolError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_service_addr_device_session<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 ProtocolAddress,
) -> Pin<Box<dyn Future<Output = Result<usize, SignalProtocolError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Remove a session record for a recipient ID + device ID tuple.