pub struct ValkeySessionStore { /* private fields */ }Expand description
Valkey-backed session label store.
Implementations§
Source§impl ValkeySessionStore
impl ValkeySessionStore
Sourcepub fn from_config(cfg: &ValkeyConfig) -> Result<Self, BuildError>
pub fn from_config(cfg: &ValkeyConfig) -> Result<Self, BuildError>
Build from validated config. The pool is created lazily, so this does not dial Valkey — connection failures surface on first use and correctly fail the request closed.
Trait Implementations§
Source§impl SessionStore for ValkeySessionStore
impl SessionStore for ValkeySessionStore
Source§fn load_labels<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, SessionStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_labels<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, SessionStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load the union of labels accumulated for the session.
Ok(empty)
for new or unknown sessions (a confirmed key-miss); Err only on
a backend failure.Source§fn append_labels<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
labels: &'life2 [String],
) -> Pin<Box<dyn Future<Output = Result<(), SessionStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn append_labels<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
labels: &'life2 [String],
) -> Pin<Box<dyn Future<Output = Result<(), SessionStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Append labels to the session. Existing labels are kept; new ones
are unioned in. Caller has already deduped against
load_labels
in the hot path, but the store re-dedups defensively. Err only
on a backend failure.Auto Trait Implementations§
impl !RefUnwindSafe for ValkeySessionStore
impl !UnwindSafe for ValkeySessionStore
impl Freeze for ValkeySessionStore
impl Send for ValkeySessionStore
impl Sync for ValkeySessionStore
impl Unpin for ValkeySessionStore
impl UnsafeUnpin for ValkeySessionStore
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