pub struct InMemoryKvProvider { /* private fields */ }Expand description
In-memory implementation of KvMemoryProvider (for testing and single-node deployments).
Implementations§
Trait Implementations§
Source§impl Clone for InMemoryKvProvider
impl Clone for InMemoryKvProvider
Source§fn clone(&self) -> InMemoryKvProvider
fn clone(&self) -> InMemoryKvProvider
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for InMemoryKvProvider
impl Default for InMemoryKvProvider
Source§fn default() -> InMemoryKvProvider
fn default() -> InMemoryKvProvider
Returns the “default value” for a type. Read more
Source§impl KvMemoryProvider for InMemoryKvProvider
impl KvMemoryProvider for InMemoryKvProvider
Source§fn store<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
key: &'life2 str,
value: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn store<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
key: &'life2 str,
value: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Store a value under the given key for a session.
Source§fn retrieve<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
key: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn retrieve<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
key: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Retrieve a single value by key.
Auto Trait Implementations§
impl Freeze for InMemoryKvProvider
impl !RefUnwindSafe for InMemoryKvProvider
impl Send for InMemoryKvProvider
impl Sync for InMemoryKvProvider
impl Unpin for InMemoryKvProvider
impl UnsafeUnpin for InMemoryKvProvider
impl !UnwindSafe for InMemoryKvProvider
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