pub struct KeyValueSender<T: Transport> { /* private fields */ }
Expand description
KeyValueSender sends messages to a KeyValue service client for sending KeyValue messages
Implementations§
Source§impl<T: Transport> KeyValueSender<T>
impl<T: Transport> KeyValueSender<T>
pub fn set_timeout(&self, interval: Duration)
Trait Implementations§
Source§impl<T: Clone + Transport> Clone for KeyValueSender<T>
impl<T: Clone + Transport> Clone for KeyValueSender<T>
Source§fn clone(&self) -> KeyValueSender<T>
fn clone(&self) -> KeyValueSender<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<T: Transport + Sync + Send> KeyValue for KeyValueSender<T>
impl<T: Transport + Sync + Send> KeyValue for KeyValueSender<T>
Source§fn increment<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 IncrementRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<i32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn increment<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 IncrementRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<i32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Increments a numeric value, returning the new value
Source§fn contains<'life0, 'life1, 'life2, 'async_trait, TS>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 TS,
) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>
fn contains<'life0, 'life1, 'life2, 'async_trait, TS>( &'life0 self, ctx: &'life1 Context, arg: &'life2 TS, ) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>
returns whether the store contains the key
Source§fn del<'life0, 'life1, 'life2, 'async_trait, TS>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 TS,
) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>
fn del<'life0, 'life1, 'life2, 'async_trait, TS>( &'life0 self, ctx: &'life1 Context, arg: &'life2 TS, ) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>
Deletes a key, returning true if the key was deleted
Source§fn get<'life0, 'life1, 'life2, 'async_trait, TS>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 TS,
) -> Pin<Box<dyn Future<Output = RpcResult<GetResponse>> + Send + 'async_trait>>
fn get<'life0, 'life1, 'life2, 'async_trait, TS>( &'life0 self, ctx: &'life1 Context, arg: &'life2 TS, ) -> Pin<Box<dyn Future<Output = RpcResult<GetResponse>> + Send + 'async_trait>>
Gets a value for a specified key. If the key exists, the return structure contains exists: true and the value, otherwise the return structure contains exists == false.
Source§fn list_add<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 ListAddRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<u32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn list_add<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 ListAddRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<u32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Append a value onto the end of a list. Returns the new list size
Source§fn list_clear<'life0, 'life1, 'life2, 'async_trait, TS>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 TS,
) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>
fn list_clear<'life0, 'life1, 'life2, 'async_trait, TS>( &'life0 self, ctx: &'life1 Context, arg: &'life2 TS, ) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>
Deletes a list and its contents input: list name output: true if the list existed and was deleted
Source§fn list_del<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 ListDelRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn list_del<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 ListDelRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Deletes a value from a list. Returns true if the item was removed.
Source§fn list_range<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 ListRangeRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<StringList>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn list_range<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 ListRangeRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<StringList>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Retrieves a range of values from a list using 0-based indices. Start and end values are inclusive, for example, (0,10) returns 11 items if the list contains at least 11 items. If the stop value is beyond the end of the list, it is treated as the end of the list.
Source§fn set<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 SetRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn set<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 SetRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Sets the value of a key. expires is an optional number of seconds before the value should be automatically deleted, or 0 for no expiration.
Source§fn set_add<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 SetAddRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<u32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn set_add<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 SetAddRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<u32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Add an item into a set. Returns number of items added (1 or 0)
Source§fn set_del<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 SetDelRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<u32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn set_del<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 SetDelRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<u32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Deletes an item from the set. Returns number of items removed from the set (1 or 0)
Source§fn set_intersection<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 StringList,
) -> Pin<Box<dyn Future<Output = RpcResult<StringList>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn set_intersection<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 StringList,
) -> Pin<Box<dyn Future<Output = RpcResult<StringList>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
perform intersection of sets and returns values from the intersection. input: list of sets for performing intersection (at least two) output: values
Source§fn set_query<'life0, 'life1, 'life2, 'async_trait, TS>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 TS,
) -> Pin<Box<dyn Future<Output = RpcResult<StringList>> + Send + 'async_trait>>
fn set_query<'life0, 'life1, 'life2, 'async_trait, TS>( &'life0 self, ctx: &'life1 Context, arg: &'life2 TS, ) -> Pin<Box<dyn Future<Output = RpcResult<StringList>> + Send + 'async_trait>>
Retrieves all items from a set input: String output: set members
Source§fn set_union<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 StringList,
) -> Pin<Box<dyn Future<Output = RpcResult<StringList>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn set_union<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 StringList,
) -> Pin<Box<dyn Future<Output = RpcResult<StringList>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
perform union of sets and returns values from the union input: list of sets for performing union (at least two) output: union of values
Source§fn set_clear<'life0, 'life1, 'life2, 'async_trait, TS>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 TS,
) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>
fn set_clear<'life0, 'life1, 'life2, 'async_trait, TS>( &'life0 self, ctx: &'life1 Context, arg: &'life2 TS, ) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>
clears all values from the set and removes it input: set name output: true if the set existed and was deleted