Struct tower_sessions::MemoryStore
source ยท pub struct MemoryStore(/* private fields */);Available on crate feature
memory-store only.Expand description
A session store that lives only in memory.
This is useful for testing but not recommended for real applications.
ยงExamples
use tower_sessions::MemoryStore;
MemoryStore::default();Trait Implementationsยง
sourceยงimpl Clone for MemoryStore
impl Clone for MemoryStore
sourceยง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 moresourceยงimpl Debug for MemoryStore
impl Debug for MemoryStore
sourceยงimpl Default for MemoryStore
impl Default for MemoryStore
sourceยงfn default() -> MemoryStore
fn default() -> MemoryStore
Returns the โdefault valueโ for a type. Read more
sourceยงimpl SessionStore for MemoryStore
impl SessionStore for MemoryStore
sourceยงfn save<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 Record
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
MemoryStore: 'async_trait,
fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 Record
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
MemoryStore: 'async_trait,
A method for saving a session in a store.
Auto Trait Implementationsยง
impl !RefUnwindSafe for MemoryStore
impl Send for MemoryStore
impl Sync for MemoryStore
impl Unpin for MemoryStore
impl !UnwindSafe for MemoryStore
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