Struct matrix_sdk_crypto::store::caches::SessionStore
source · [−]pub struct SessionStore { /* private fields */ }
Expand description
In-memory store for Olm Sessions.
Implementations
sourceimpl 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
sourceimpl Clone for SessionStore
impl Clone for SessionStore
sourcefn clone(&self) -> SessionStore
fn clone(&self) -> SessionStore
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SessionStore
impl Debug for SessionStore
sourceimpl Default for SessionStore
impl Default for SessionStore
sourcefn 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more