pub struct MemorySessionDataStore { /* private fields */ }Expand description
In-memory SessionDataStore backed by a HashMap.
Suitable for single-process deployments and testing. Data does not survive process restarts.
Implementations§
Trait Implementations§
Source§impl Clone for MemorySessionDataStore
impl Clone for MemorySessionDataStore
Source§fn clone(&self) -> MemorySessionDataStore
fn clone(&self) -> MemorySessionDataStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MemorySessionDataStore
impl Debug for MemorySessionDataStore
Source§impl Default for MemorySessionDataStore
impl Default for MemorySessionDataStore
Source§impl SessionDataStore for MemorySessionDataStore
impl SessionDataStore for MemorySessionDataStore
Source§fn set<'life0, 'async_trait>(
&'life0 self,
session_id: Uuid,
key: String,
value: Value,
) -> Pin<Box<dyn Future<Output = Result<(), SessionDataError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set<'life0, 'async_trait>(
&'life0 self,
session_id: Uuid,
key: String,
value: Value,
) -> Pin<Box<dyn Future<Output = Result<(), SessionDataError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stores a value under
(session_id, key), overwriting any existing value. Read moreSource§fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: Uuid,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Value>, SessionDataError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: Uuid,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Value>, SessionDataError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Retrieves the value stored under
(session_id, key). Read moreSource§fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: Uuid,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), SessionDataError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: Uuid,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), SessionDataError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Deletes the value stored under
(session_id, key). Read moreAuto Trait Implementations§
impl Freeze for MemorySessionDataStore
impl RefUnwindSafe for MemorySessionDataStore
impl Send for MemorySessionDataStore
impl Sync for MemorySessionDataStore
impl Unpin for MemorySessionDataStore
impl UnsafeUnpin for MemorySessionDataStore
impl UnwindSafe for MemorySessionDataStore
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