Struct mailpot_web::MemoryStore
pub struct MemoryStore {
inner: Arc<RwLock<HashMap<String, Session, RandomState>>>,
}
Expand description
in-memory session store
Because there is no external persistance, this session store is ephemeral and will be cleared on server restart.
DO NOT USE THIS IN A PRODUCTION DEPLOYMENT.
Fields§
§inner: Arc<RwLock<HashMap<String, Session, RandomState>>>
Implementations§
§impl MemoryStore
impl MemoryStore
Trait Implementations§
§impl Clone for MemoryStore
impl Clone for MemoryStore
§fn clone(&self) -> MemoryStore
fn clone(&self) -> MemoryStore
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 more§impl Debug for MemoryStore
impl Debug for MemoryStore
§impl SessionStore for MemoryStore
impl SessionStore for MemoryStore
§fn load_session<'life0, 'async_trait>(
&'life0 self,
cookie_value: String
) -> Pin<Box<dyn Future<Output = Result<Option<Session>, Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
MemoryStore: 'async_trait,
fn load_session<'life0, 'async_trait>( &'life0 self, cookie_value: String ) -> Pin<Box<dyn Future<Output = Result<Option<Session>, Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, MemoryStore: 'async_trait,
Get a session from the storage backend. Read more
§fn store_session<'life0, 'async_trait>(
&'life0 self,
session: Session
) -> Pin<Box<dyn Future<Output = Result<Option<String>, Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
MemoryStore: 'async_trait,
fn store_session<'life0, 'async_trait>( &'life0 self, session: Session ) -> Pin<Box<dyn Future<Output = Result<Option<String>, Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, MemoryStore: 'async_trait,
Store a session on the storage backend. Read more