pub struct Client { /* private fields */ }Expand description
A remote client for the Celerix Store.
Client implements the CelerixStore trait and communicates with a
celerix-stored daemon over TCP. It features automatic reconnection and
exponential backoff retries.
Implementations§
Source§impl Client
impl Client
Sourcepub async fn connect(addr: &str) -> Result<Self>
pub async fn connect(addr: &str) -> Result<Self>
Connects to a remote Celerix Store daemon at the specified address.
Sourcepub async fn get_generic<T: DeserializeOwned>(
&self,
persona_id: &str,
app_id: &str,
key: &str,
) -> Result<T>
pub async fn get_generic<T: DeserializeOwned>( &self, persona_id: &str, app_id: &str, key: &str, ) -> Result<T>
Retrieves a type-safe value using generics.
Automatically handles JSON deserialization into the target type.
Trait Implementations§
Source§impl AppEnumeration for Client
impl AppEnumeration for Client
Source§impl BatchExporter for Client
impl BatchExporter for Client
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 Client
impl CelerixStore for Client
Source§impl GlobalSearcher for Client
impl GlobalSearcher for Client
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 Client
impl KVReader for Client
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 Client
impl KVWriter for Client
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 Client
impl Orchestrator for Client
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 Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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