pub struct RedisSessionStore { /* private fields */ }Expand description
Redis-backed session store that mirrors the in-memory semantics.
Implementations§
Trait Implementations§
Source§impl SessionStore for RedisSessionStore
impl SessionStore for RedisSessionStore
Source§fn create_session(
&self,
ctx: &TenantCtx,
data: SessionData,
) -> GResult<SessionKey>
fn create_session( &self, ctx: &TenantCtx, data: SessionData, ) -> GResult<SessionKey>
Creates a new session associated with the supplied tenant context and returns its key.
Source§fn get_session(&self, key: &SessionKey) -> GResult<Option<SessionData>>
fn get_session(&self, key: &SessionKey) -> GResult<Option<SessionData>>
Fetches the session payload for the provided key, if it exists.
Source§fn update_session(&self, key: &SessionKey, data: SessionData) -> GResult<()>
fn update_session(&self, key: &SessionKey, data: SessionData) -> GResult<()>
Replaces the session payload for the provided key.
Source§fn remove_session(&self, key: &SessionKey) -> GResult<()>
fn remove_session(&self, key: &SessionKey) -> GResult<()>
Removes the session entry and clears any lookup indices.
Source§fn find_by_user(
&self,
ctx: &TenantCtx,
user: &UserId,
) -> GResult<Option<(SessionKey, SessionData)>>
fn find_by_user( &self, ctx: &TenantCtx, user: &UserId, ) -> GResult<Option<(SessionKey, SessionData)>>
Finds the active session bound to the specified tenant + user combination.
Auto Trait Implementations§
impl Freeze for RedisSessionStore
impl RefUnwindSafe for RedisSessionStore
impl Send for RedisSessionStore
impl Sync for RedisSessionStore
impl Unpin for RedisSessionStore
impl UnwindSafe for RedisSessionStore
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