Expand description
§wasmCloud Key-Value Store Actor Interface
This crate provides wasmCloud actors with an interface to the key-value capability provider. Actors using this
interface must have the claim wasmcloud:keyvalue
in order to have permission to communicate with the store.
The key-value provider is one-way, and only accepts host calls from the actor. This provider does not deliver messages to actors.
§Example:
extern crate wasmcloud_actor_keyvalue as kv;
use wapc_guest::HandlerResult;
fn add() -> HandlerResult<()> {
let _ = kv::default().add("test".to_string(), 1)?;
Ok(())
}
Structs§
- AddArgs
- AddResponse
- Response type for Add operations
- Clear
Args - DelArgs
- DelResponse
- Response type for Delete operations
- GetArgs
- GetResponse
- Response type for Get operations
- Host
- KeyExists
Args - List
Item Delete Args - List
Range Response - Response type for list range operations
- List
Response - Response type for list push operations
- Push
Args - Range
Args - SetAdd
Args - SetArgs
- SetIntersection
Args - SetOperation
Response - Response type for set add operations
- SetQuery
Args - SetQuery
Response - Response type for set query operations
- SetRemove
Args - SetResponse
- Response type for the Set operation, not to be confused with the set data structure
- SetUnion
Args
Constants§
- OP_ADD
- OP_
CLEAR - OP_DEL
- OP_GET
- OP_
KEY_ EXISTS - OP_
LIST_ DEL - OP_PUSH
- OP_
RANGE - OP_SET
- OP_
SET_ ADD - OP_
SET_ INTERSECT - OP_
SET_ QUERY - OP_
SET_ REMOVE - OP_
SET_ UNION
Functions§
- default
- Creates the default host binding
- deserialize
- The standard function for de-serializing codec structs from a format suitable for message exchange between actor and host. Use of any other function to deserialize could result in breaking incompatibilities.
- host
- Creates a named host binding
- serialize
- The standard function for serializing codec structs into a format that can be used for message exchange between actor and host. Use of any other function to serialize could result in breaking incompatibilities.