Kagome
Polkadot Runtime Engine in C++17
|
#include <offchain_storage.hpp>
Public Member Functions | |
virtual | ~OffchainStorage ()=default |
virtual outcome::result< void > | set (const common::BufferView &key, common::Buffer value)=0 |
Sets a value in the storage. More... | |
virtual outcome::result< void > | clear (const common::BufferView &key)=0 |
Remove a value from the local storage. More... | |
virtual outcome::result< bool > | compare_and_set (const common::BufferView &key, const std::optional< common::BufferView > &expected, common::Buffer value)=0 |
Sets a new value in the local storage if the condition matches the current value. More... | |
virtual outcome::result< common::Buffer > | get (const common::BufferView &key)=0 |
Gets a value from the local storage. More... | |
A wrapper for a storage of offchain data Provides a convenient interface to work with it
Definition at line 20 of file offchain_storage.hpp.
|
virtualdefault |
|
pure virtual |
Remove a value from the local storage.
key | a pointer-size indicating the key |
Implemented in kagome::offchain::OffchainLocalStorageImpl, and kagome::offchain::OffchainPersistentStorageImpl.
|
pure virtual |
Sets a new value in the local storage if the condition matches the current value.
key | a pointer-size indicating the key |
expected | a pointer-size indicating the old value |
value | a pointer-size indicating the new value |
Implemented in kagome::offchain::OffchainLocalStorageImpl, and kagome::offchain::OffchainPersistentStorageImpl.
|
pure virtual |
Gets a value from the local storage.
key | a pointer-size indicating the key |
Implemented in kagome::offchain::OffchainLocalStorageImpl, and kagome::offchain::OffchainPersistentStorageImpl.
|
pure virtual |
Sets a value in the storage.
key | a pointer-size indicating the key |
value | a pointer-size indicating the value |
Implemented in kagome::offchain::OffchainLocalStorageImpl, and kagome::offchain::OffchainPersistentStorageImpl.