pub struct MemClientDataStore { /* private fields */ }Expand description
In-memory client data store backed by a HashMap.
All data lives in process memory and is lost on restart. Suitable for tests and development.
Implementations§
Trait Implementations§
Source§impl ClientDataStore for MemClientDataStore
impl ClientDataStore for MemClientDataStore
Source§fn store<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 str,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = RustvelloResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn store<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 str,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = RustvelloResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Store a serialized value by its content-hash key. Read more
Source§fn retrieve<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = RustvelloResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn retrieve<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = RustvelloResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Retrieve a serialized value by its reference key. Read more
Source§fn purge<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RustvelloResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn purge<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RustvelloResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Remove all stored data.
Source§fn backend_name(&self) -> &'static str
fn backend_name(&self) -> &'static str
Human-readable name of this backend implementation.
Auto Trait Implementations§
impl !Freeze for MemClientDataStore
impl !RefUnwindSafe for MemClientDataStore
impl Send for MemClientDataStore
impl Sync for MemClientDataStore
impl Unpin for MemClientDataStore
impl UnsafeUnpin for MemClientDataStore
impl !UnwindSafe for MemClientDataStore
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