pub struct MemorySessionStore { /* private fields */ }Expand description
In-memory session storage (data lost on process termination)
Implementations§
Trait Implementations§
Source§impl Default for MemorySessionStore
impl Default for MemorySessionStore
Source§impl ExtendedSessionStore for MemorySessionStore
impl ExtendedSessionStore for MemorySessionStore
fn session_count<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = usize> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn clear_all_sessions<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_session<'life0, 'life1, 'async_trait>(
&'life0 mut self,
address: &'life1 ProtocolAddress,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§impl SessionStore for MemorySessionStore
impl SessionStore for MemorySessionStore
Source§fn load_session<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 ProtocolAddress,
) -> Pin<Box<dyn Future<Output = Result<Option<SessionRecord>, SignalProtocolError>> + '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>, SignalProtocolError>> + '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<(), SignalProtocolError>> + '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<(), SignalProtocolError>> + '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 MemorySessionStore
impl !RefUnwindSafe for MemorySessionStore
impl Send for MemorySessionStore
impl Sync for MemorySessionStore
impl Unpin for MemorySessionStore
impl !UnwindSafe for MemorySessionStore
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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