pub struct MemoryStore { /* private fields */ }Expand description
Sessions held in this process’s memory.
Everything is lost on restart and nothing is shared between processes, which makes it perfect for tests and wrong for anything running more than one worker.
Implementations§
Trait Implementations§
Source§impl Default for MemoryStore
impl Default for MemoryStore
Source§impl SessionStore for MemoryStore
impl SessionStore for MemoryStore
Source§fn read<'a>(&'a self, id: &'a str) -> StoreFuture<'a, Option<Session>>
fn read<'a>(&'a self, id: &'a str) -> StoreFuture<'a, Option<Session>>
Load a session, or
None if it is unknown or has expired.Source§fn write<'a>(&'a self, session: &'a Session) -> StoreFuture<'a, ()>
fn write<'a>(&'a self, session: &'a Session) -> StoreFuture<'a, ()>
Persist a session under its current id.
Source§fn destroy<'a>(&'a self, id: &'a str) -> StoreFuture<'a, ()>
fn destroy<'a>(&'a self, id: &'a str) -> StoreFuture<'a, ()>
Remove a session. Called on logout and after an id rotation.
Auto Trait Implementations§
impl !Freeze for MemoryStore
impl RefUnwindSafe for MemoryStore
impl Send for MemoryStore
impl Sync for MemoryStore
impl Unpin for MemoryStore
impl UnsafeUnpin 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