pub struct MemStore { /* private fields */ }Expand description
A thread-safe, in-memory implementation of the CelerixStore trait.
MemStore maintains all data in memory for high-performance concurrent access
and supports asynchronous persistence to JSON files.
Implementations§
Source§impl MemStore
impl MemStore
Trait Implementations§
Source§impl AppEnumeration for MemStore
impl AppEnumeration for MemStore
Source§impl BatchExporter for MemStore
impl BatchExporter for MemStore
Source§fn get_app_store<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
persona_id: &'life1 str,
app_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, Value>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_app_store<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
persona_id: &'life1 str,
app_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, Value>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Returns all key-value pairs for a specific app within a persona.
Source§fn dump_app<'life0, 'life1, 'async_trait>(
&'life0 self,
app_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, HashMap<String, Value>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn dump_app<'life0, 'life1, 'async_trait>(
&'life0 self,
app_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, HashMap<String, Value>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns data for a specific app across all personas.
Source§impl CelerixStore for MemStore
impl CelerixStore for MemStore
Source§impl GlobalSearcher for MemStore
impl GlobalSearcher for MemStore
Source§fn get_global<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
app_id: &'life1 str,
key: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(Value, String)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_global<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
app_id: &'life1 str,
key: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(Value, String)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Finds a key within an app by searching all personas. Returns the value and the persona ID where it was found.
Source§impl KVReader for MemStore
impl KVReader for MemStore
Source§fn get<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
persona_id: &'life1 str,
app_id: &'life2 str,
key: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn get<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
persona_id: &'life1 str,
app_id: &'life2 str,
key: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Retrieves a value for a specific persona, app, and key.
Source§impl KVWriter for MemStore
impl KVWriter for MemStore
Source§fn set<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
persona_id: &'life1 str,
app_id: &'life2 str,
key: &'life3 str,
value: Value,
) -> 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 set<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
persona_id: &'life1 str,
app_id: &'life2 str,
key: &'life3 str,
value: Value,
) -> 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,
Stores a value for a specific persona, app, and key.
Source§fn delete<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
persona_id: &'life1 str,
app_id: &'life2 str,
key: &'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 delete<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
persona_id: &'life1 str,
app_id: &'life2 str,
key: &'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,
Deletes a key from a specific persona and app.
Source§impl Orchestrator for MemStore
impl Orchestrator for MemStore
Source§fn move_key<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
src_persona: &'life1 str,
dst_persona: &'life2 str,
app_id: &'life3 str,
key: &'life4 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,
'life4: 'async_trait,
fn move_key<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
src_persona: &'life1 str,
dst_persona: &'life2 str,
app_id: &'life3 str,
key: &'life4 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,
'life4: 'async_trait,
Moves a key from one persona to another within the same app.
Auto Trait Implementations§
impl !Freeze for MemStore
impl RefUnwindSafe for MemStore
impl Send for MemStore
impl Sync for MemStore
impl Unpin for MemStore
impl UnwindSafe for MemStore
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