pub struct SessionMemory { /* private fields */ }Expand description
In-process session memory. Cleared when the session ends. Thread-safe via RwLock.
Implementations§
Trait Implementations§
Source§impl Default for SessionMemory
impl Default for SessionMemory
Source§impl MemoryStore for SessionMemory
impl MemoryStore for SessionMemory
fn set<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
value: Value,
) -> Pin<Box<dyn Future<Output = Result<(), MemoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<MemoryEntry>, MemoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), MemoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_keys<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, MemoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn search_by_tag<'life0, 'life1, 'async_trait>(
&'life0 self,
tag: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryEntry>, MemoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn set_tagged<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
value: Value,
tags: Vec<String>,
) -> Pin<Box<dyn Future<Output = Result<(), MemoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl !Freeze for SessionMemory
impl RefUnwindSafe for SessionMemory
impl Send for SessionMemory
impl Sync for SessionMemory
impl Unpin for SessionMemory
impl UnsafeUnpin for SessionMemory
impl UnwindSafe for SessionMemory
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