pub struct InMemorySessionStore { /* private fields */ }Expand description
In-memory implementation backed by a concurrent hash map.
Implementations§
Trait Implementations§
Source§impl Default for InMemorySessionStore
impl Default for InMemorySessionStore
Source§impl SessionStore for InMemorySessionStore
impl SessionStore for InMemorySessionStore
Source§fn get(&self, key: &SessionKey) -> GResult<Option<(Session, Cas)>>
fn get(&self, key: &SessionKey) -> GResult<Option<(Session, Cas)>>
Fetch by key; returns
(Session, Cas) if present.Source§fn update_cas(
&self,
session: Session,
expected: Cas,
) -> GResult<Result<Cas, Cas>>
fn update_cas( &self, session: Session, expected: Cas, ) -> GResult<Result<Cas, Cas>>
Update using CAS—only writes if
expected matches the stored Cas.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