pub struct SharedSessionStore { /* private fields */ }Expand description
Shared session store handle that wraps the greentic-session backends.
Implementations§
Sourcepub async fn find_by_user(
&self,
ctx: &TenantCtx,
user: &UserId,
) -> Result<Option<(SessionKey, SessionData)>>
pub async fn find_by_user( &self, ctx: &TenantCtx, user: &UserId, ) -> Result<Option<(SessionKey, SessionData)>>
Looks up the active session bound to the provided tenant + user combination.
Sourcepub async fn create_session(
&self,
ctx: &TenantCtx,
data: SessionData,
) -> Result<SessionKey>
pub async fn create_session( &self, ctx: &TenantCtx, data: SessionData, ) -> Result<SessionKey>
Creates a new session and returns its key.
Sourcepub async fn update_session(
&self,
key: &SessionKey,
data: SessionData,
) -> Result<()>
pub async fn update_session( &self, key: &SessionKey, data: SessionData, ) -> Result<()>
Updates an existing session with the supplied snapshot.
Trait Implementations§
Source§fn clone(&self) -> SharedSessionStore
fn clone(&self) -> SharedSessionStore
Returns a duplicate 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 moreAuto Trait Implementations§
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