pub struct MemoryPersistence { /* private fields */ }Expand description
In-memory persistence (good for tests).
Implementations§
Trait Implementations§
Source§impl Default for MemoryPersistence
impl Default for MemoryPersistence
Source§impl SessionPersistence for MemoryPersistence
impl SessionPersistence for MemoryPersistence
Source§fn save<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
snapshot: &'life2 SessionSnapshot,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn save<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
snapshot: &'life2 SessionSnapshot,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Save a session snapshot.
Source§fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<SessionSnapshot>, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<SessionSnapshot>, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load a previously saved session snapshot.
Auto Trait Implementations§
impl Freeze for MemoryPersistence
impl !RefUnwindSafe for MemoryPersistence
impl Send for MemoryPersistence
impl Sync for MemoryPersistence
impl Unpin for MemoryPersistence
impl !UnwindSafe for MemoryPersistence
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