pub trait KeyValue {
Show 16 methods
// Required 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 Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: '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>>
where TS: 'async_trait + ToString + ?Sized + Sync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: '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>>
where TS: 'async_trait + ToString + ?Sized + Sync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: '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>>
where TS: 'async_trait + ToString + ?Sized + Sync,
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;
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>>
where TS: 'async_trait + ToString + ?Sized + Sync,
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;
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 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_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_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_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_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>>
where TS: 'async_trait + ToString + ?Sized + Sync,
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;
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>>
where TS: 'async_trait + ToString + ?Sized + Sync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
// Provided method
fn contract_id() -> &'static str { ... }
}
Expand description
wasmbus.contractId: wasmcloud:keyvalue wasmbus.providerReceive
Required Methods§
Sourcefn 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
Sourcefn 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
Sourcefn 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
Sourcefn 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.
Sourcefn 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
Sourcefn 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
Sourcefn 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.
Sourcefn 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.
Sourcefn 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.
Sourcefn 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)
Sourcefn 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)
Sourcefn 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
Sourcefn 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
Sourcefn 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
Provided Methods§
Sourcefn contract_id() -> &'static str
fn contract_id() -> &'static str
returns the capability contract id for this interface
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.