pub struct InMemorySessionStore { /* private fields */ }
Expand description
An in-memory SessionStore
.
Trait Implementations§
Source§impl Debug for InMemorySessionStore
impl Debug for InMemorySessionStore
Source§impl Default for InMemorySessionStore
impl Default for InMemorySessionStore
Source§fn default() -> InMemorySessionStore
fn default() -> InMemorySessionStore
Returns the “default value” for a type. Read more
Source§impl SessionStore for InMemorySessionStore
impl SessionStore for InMemorySessionStore
Source§fn load_session(
&self,
address: Address,
) -> Result<Option<SerializedSession>, InternalError>
fn load_session( &self, address: Address, ) -> Result<Option<SerializedSession>, InternalError>
Get a copy of the serialized session record corresponding to the
provided recipient
Address
.Source§fn get_sub_device_sessions(
&self,
name: &[u8],
) -> Result<Vec<i32>, InternalError>
fn get_sub_device_sessions( &self, name: &[u8], ) -> Result<Vec<i32>, InternalError>
Get the IDs of all known devices with active sessions for a recipient.
Source§fn store_session(
&self,
addr: Address,
session: SerializedSession,
) -> Result<(), InternalError>
fn store_session( &self, addr: Address, session: SerializedSession, ) -> Result<(), InternalError>
Commit to storage the session record for a given recipient ID + device
ID tuple.
Source§fn delete_session(&self, addr: Address) -> Result<(), InternalError>
fn delete_session(&self, addr: Address) -> Result<(), InternalError>
Remove a session record for a recipient ID + device ID tuple.
Source§fn delete_all_sessions(&self, name: &[u8]) -> Result<usize, InternalError>
fn delete_all_sessions(&self, name: &[u8]) -> Result<usize, InternalError>
Remove the session records corresponding to all devices of a recipient
ID. Read more
Source§fn contains_session(&self, addr: Address) -> Result<bool, InternalError>
fn contains_session(&self, addr: Address) -> Result<bool, InternalError>
Determine whether there is a committed session record for a
recipient ID + device ID tuple.
Auto Trait Implementations§
impl !Freeze for InMemorySessionStore
impl RefUnwindSafe for InMemorySessionStore
impl !Send for InMemorySessionStore
impl !Sync for InMemorySessionStore
impl Unpin for InMemorySessionStore
impl UnwindSafe for InMemorySessionStore
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