Struct matrix_sdk_crypto::store::caches::SessionStore
source · pub struct SessionStore { /* private fields */ }
Expand description
In-memory store for Olm Sessions.
Implementations§
source§impl SessionStore
impl SessionStore
sourcepub async fn add(&self, session: Session) -> bool
pub async fn add(&self, session: Session) -> bool
Add a session to the store.
Returns true if the session was added, false if the session was already in the store.
sourcepub fn get(&self, sender_key: &str) -> Option<Arc<Mutex<Vec<Session>>>>
pub fn get(&self, sender_key: &str) -> Option<Arc<Mutex<Vec<Session>>>>
Get all the sessions that belong to the given sender key.
sourcepub fn set_for_sender(&self, sender_key: &str, sessions: Vec<Session>)
pub fn set_for_sender(&self, sender_key: &str, sessions: Vec<Session>)
Add a list of sessions belonging to the sender key.
Trait Implementations§
source§impl Clone for SessionStore
impl Clone for SessionStore
source§fn clone(&self) -> SessionStore
fn clone(&self) -> SessionStore
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 Debug for SessionStore
impl Debug for SessionStore
source§impl Default for SessionStore
impl Default for SessionStore
source§fn default() -> SessionStore
fn default() -> SessionStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for SessionStore
impl Send for SessionStore
impl Sync for SessionStore
impl Unpin for SessionStore
impl UnwindSafe for SessionStore
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