Available on crate feature
key-value only.Expand description
Persistent key-value storage.
This module provides a generic interface for key-value storage, which may be implemented by the host various ways (e.g. via an in-memory table, a local file, or a remote database). Details such as consistency model and durability will depend on the implementation and may vary from one to store to the next.
§Examples
Open the default store and set the ‘message’ key:
let store = spin_sdk::key_value::Store::open_default().await?;
store.set("message", "Hello world".as_bytes()).await?;Structs§
Enums§
- Error
- The set of errors which may be raised by functions in this interface