Struct libsignal_protocol::InMemSessionStore
source · pub struct InMemSessionStore { /* private fields */ }
Expand description
Reference implementation of traits::SessionStore.
Implementations§
source§impl InMemSessionStore
impl InMemSessionStore
sourcepub fn load_existing_sessions(
&self,
addresses: &[&ProtocolAddress],
) -> Result<Vec<&SessionRecord>>
pub fn load_existing_sessions( &self, addresses: &[&ProtocolAddress], ) -> Result<Vec<&SessionRecord>>
Bulk version of SessionStore::load_session
.
Useful for crate::sealed_sender_multi_recipient_encrypt.
Trait Implementations§
source§impl Clone for InMemSessionStore
impl Clone for InMemSessionStore
source§fn clone(&self) -> InMemSessionStore
fn clone(&self) -> InMemSessionStore
Returns a copy 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 Default for InMemSessionStore
impl Default for InMemSessionStore
source§impl SessionStore for InMemSessionStore
impl SessionStore for InMemSessionStore
source§fn load_session<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 ProtocolAddress,
) -> Pin<Box<dyn Future<Output = Result<Option<SessionRecord>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_session<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 ProtocolAddress,
) -> Pin<Box<dyn Future<Output = Result<Option<SessionRecord>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Look up the session corresponding to
address
.source§fn store_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
address: &'life1 ProtocolAddress,
record: &'life2 SessionRecord,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn store_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
address: &'life1 ProtocolAddress,
record: &'life2 SessionRecord,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Set the entry for
address
to the value of record
.Auto Trait Implementations§
impl Freeze for InMemSessionStore
impl RefUnwindSafe for InMemSessionStore
impl Send for InMemSessionStore
impl Sync for InMemSessionStore
impl Unpin for InMemSessionStore
impl UnwindSafe for InMemSessionStore
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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 more