pub trait KeyValue {
Show 16 methods
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
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait;
fn contains<'life0, 'life1, 'life2, 'async_trait, TS: ToString + ?Sized + Sync>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 TS
) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>
where
TS: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait;
fn del<'life0, 'life1, 'life2, 'async_trait, TS: ToString + ?Sized + Sync>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 TS
) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>
where
TS: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait;
fn get<'life0, 'life1, 'life2, 'async_trait, TS: ToString + ?Sized + Sync>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 TS
) -> Pin<Box<dyn Future<Output = RpcResult<GetResponse>> + Send + 'async_trait>>
where
TS: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: '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
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait;
fn list_clear<'life0, 'life1, 'life2, 'async_trait, TS: ToString + ?Sized + Sync>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 TS
) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>
where
TS: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: '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
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: '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
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: '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
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: '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
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: '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
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: '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
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait;
fn set_query<'life0, 'life1, 'life2, 'async_trait, TS: ToString + ?Sized + Sync>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 TS
) -> Pin<Box<dyn Future<Output = RpcResult<StringList>> + Send + 'async_trait>>
where
TS: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: '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
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait;
fn set_clear<'life0, 'life1, 'life2, 'async_trait, TS: ToString + ?Sized + Sync>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 TS
) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>
where
TS: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait;
fn contract_id() -> &'static str { ... }
}
Expand description
wasmbus.contractId: wasmcloud:keyvalue wasmbus.providerReceive
Required methods
Increments a numeric value, returning the new value
fn contains<'life0, 'life1, 'life2, 'async_trait, TS: ToString + ?Sized + Sync>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 TS
) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>> where
TS: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn contains<'life0, 'life1, 'life2, 'async_trait, TS: ToString + ?Sized + Sync>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 TS
) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>> where
TS: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
returns whether the store contains the key
fn del<'life0, 'life1, 'life2, 'async_trait, TS: ToString + ?Sized + Sync>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 TS
) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>> where
TS: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn del<'life0, 'life1, 'life2, 'async_trait, TS: ToString + ?Sized + Sync>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 TS
) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>> where
TS: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Deletes a key, returning true if the key was deleted
fn get<'life0, 'life1, 'life2, 'async_trait, TS: ToString + ?Sized + Sync>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 TS
) -> Pin<Box<dyn Future<Output = RpcResult<GetResponse>> + Send + 'async_trait>> where
TS: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn get<'life0, 'life1, 'life2, 'async_trait, TS: ToString + ?Sized + Sync>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 TS
) -> Pin<Box<dyn Future<Output = RpcResult<GetResponse>> + Send + 'async_trait>> where
TS: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: '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.
Append a value onto the end of a list. Returns the new list size
fn list_clear<'life0, 'life1, 'life2, 'async_trait, TS: ToString + ?Sized + Sync>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 TS
) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>> where
TS: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn list_clear<'life0, 'life1, 'life2, 'async_trait, TS: ToString + ?Sized + Sync>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 TS
) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>> where
TS: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Deletes a list and its contents input: list name output: true if the list existed and was deleted
Deletes a value from a list. Returns true if the item was removed.
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
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: '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
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: '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.
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.
Add an item into a set. Returns number of items added (1 or 0)
Deletes an item from the set. Returns number of items removed from the set (1 or 0)
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
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: '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
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
perform intersection of sets and returns values from the intersection. input: list of sets for performing intersection (at least two) output: values
fn set_query<'life0, 'life1, 'life2, 'async_trait, TS: ToString + ?Sized + Sync>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 TS
) -> Pin<Box<dyn Future<Output = RpcResult<StringList>> + Send + 'async_trait>> where
TS: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn set_query<'life0, 'life1, 'life2, 'async_trait, TS: ToString + ?Sized + Sync>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 TS
) -> Pin<Box<dyn Future<Output = RpcResult<StringList>> + Send + 'async_trait>> where
TS: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Retrieves all items from a set input: String output: set members
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
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: '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
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: '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
fn set_clear<'life0, 'life1, 'life2, 'async_trait, TS: ToString + ?Sized + Sync>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 TS
) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>> where
TS: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn set_clear<'life0, 'life1, 'life2, 'async_trait, TS: ToString + ?Sized + Sync>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 TS
) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>> where
TS: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
clears all values from the set and removes it input: set name output: true if the set existed and was deleted
Provided methods
fn contract_id() -> &'static str
fn contract_id() -> &'static str
returns the capability contract id for this interface